[rspec-users] Specifying mixins
Scott Taylor
mailing_lists at railsnewbie.com
Thu Nov 1 21:18:18 EDT 2007
On Nov 1, 2007, at 7:30 PM, aslak hellesoy wrote:
> just a short advice:
>
> describe MyModule do
> it "should do something" do
> # The module is automatically mixed into your spec
> end
> end
>
> Aslak
I suppose it really depends on how static/dynamic the module is.
This seems to work well for a relatively static case, but how you
spec out a module like Enumerable in this manner (in which a series
of methods is added to class if a method is implemented in the class
- in the case, #each)?
Scott
More information about the rspec-users
mailing list