librelist archives

« back to archive

White Shoes... what does the "generic" spec look like?

White Shoes... what does the "generic" spec look like?

From:
Peter Fitzgibbons
Date:
2012-01-18 @ 20:56
Howdy Folks,

I've been trying to create the WhiteShoes Spec.
The constraints I've read so far :

   - Every Shoes implementation should adhere to the WhiteShoes spec.

The constraints I've adopted locally :

   - "Shoes implementation" means Shoes<Framework>.  So we "could" build a
   text-only shoes implementation that exercises all parts of shoes
   (theoretically)
   - "WhiteShoes Spec" is a collection of RSpec shared_example's.  Every
   Spec<Framework>::<Class>_Spec needs to include "it_behaves_like "A
   WhiteShoes::<Class>"

The problem I am seeing is that the Shoes<Framework> implementation
requires certain internals to be mocked... and the shared_examples should
not have to know anything about those internals.

Any thoughts on how to work around this ?
Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] White Shoes... what does the "generic" spec look like?

From:
Paul Hinze
Date:
2012-01-18 @ 21:53
On Wed, Jan 18, 2012 at 2:56 PM, Peter Fitzgibbons
<peter.fitzgibbons@gmail.com> wrote:
> I've been trying to create the WhiteShoes Spec.
>
> The problem I am seeing is that the Shoes<Framework> implementation requires
> certain internals to be mocked... and the shared_examples should not have to
> know anything about those internals.
>
> Any thoughts on how to work around this ?

Hi Peter et al.,

Really psyched to see the shoes-spec being factored out of the varying
implementations.  Thanks to all who've worked on this so far.

One thought would be to express the "WhiteShoes spec" in plain (though
structured) english as Cucumber features, which would allow there to
be flexibility in the step definitions - with different shoe colors
potentially loading their own definitions to help them stub things out
properly.

I'm not sure if this strays from the core WhiteShoes goals, and I have
my own ambivalent feelings about Cucumber generally, but it seems like
this might be a nice usage of the feature/stepdef seam Cucumber gives
you.  It would require interpretation (in the human sense) of the spec
in order to make tests, but it may allow us to come out with a
"document" of sorts that could be used for shoes in any language.

Let me know if I'm entirely off base; I've been trying to keep up my
list-lurking, but I may have missed some important points. ;)

--phinze

Re: White Shoes... what does the "generic" spec look like?

From:
Peter Fitzgibbons
Date:
2012-01-18 @ 21:37
My question here touches up to the question of how to architect the
Shoes-"plugin".

Those of you who have time, please read the following and send your
comments :

http://stackoverflow.com/questions/6954899/ruby-structure-for-extendable-handler-plugin-architechture
http://stackoverflow.com/questions/3112686/ruby-plugin-architecture

http://en.wikipedia.org/wiki/Open/closed_principle
http://thomasjo.com/2010/12/15/really-simple-and-naive-ruby-plugin-framework/

Thoughts!
Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] Re: White Shoes... what does the "generic" spec look like?

From:
Eric Watson
Date:
2012-01-18 @ 22:10
Peter,

These are good links. I believe something along these lines will work (I 
wrote this in another thread, I think). Any of these--the Shoes::Config 
route seems reasonable. If we adhere to open/closed, we can avoid most 
inheritance, which is probably good.

Eric

On Jan 18, 2012, at 3:37 PM, Peter Fitzgibbons wrote:

> My question here touches up to the question of how to architect the 
Shoes-"plugin".
> 
> Those of you who have time, please read the following and send your comments :
> 
http://stackoverflow.com/questions/6954899/ruby-structure-for-extendable-handler-plugin-architechture
> http://stackoverflow.com/questions/3112686/ruby-plugin-architecture
> 
> http://en.wikipedia.org/wiki/Open/closed_principle
> http://thomasjo.com/2010/12/15/really-simple-and-naive-ruby-plugin-framework/
> 
> Thoughts!
> Peter Fitzgibbons
> (847) 859-9550
> Email: peter.fitzgibbons@gmail.com
> IM GTalk: peter.fitzgibbons
> IM AOL: peter.fitzgibbons@gmail.com
>