On 6 Nov 2007, at 14:40, Jim Lindley wrote:
> Tom, there is likely a better path then the one I'm going down, and I
> would love to hear it. I am no RSpec expert.
Neither am I! From David's response it sounds as though there isn't a
particularly tidy way to solve this problem at the moment, so I
On 6 Nov 2007, at 14:39, David Chelimsky wrote:
>> I'm hoping that this sort of "okay, you
>> understand the basics, but NOW what?" issue is the kind of thing that
>> the hotly-anticipated RSpec book will address, because any
>> information
>> about best practice in this area is really lacking
>
> Yeah, this is fine for a simple mixin with only one shared behaviour,
> but the problem is that a real chunk of mixed-in functionality will
> probably need many behaviours that correspond to different initial
> states (provided you're behaving yourself and not doing too much state
> setup within
On Nov 6, 2007 8:11 AM, Tom Stuart <[EMAIL PROTECTED]> wrote:
> On 6 Nov 2007, at 02:00, Jim Lindley wrote:
> > Add an additional describe block for the class that you're including
> > the module into, and then setup a genericly named object in the before
> > block
> [...]
> >
> > # page_spec.rb
>
On 6 Nov 2007, at 02:00, Jim Lindley wrote:
> Add an additional describe block for the class that you're including
> the module into, and then setup a genericly named object in the before
> block
[...]
>
> # page_spec.rb
> describe Page, "should include publishing features" do
> include Publishabl
> > 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.
Add an additional describe block for the class tha
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 wor
just a short advice:
describe MyModule do
it "should do something" do
# The module is automatically mixed into your spec
end
end
Aslak
On 11/1/07, Tom Stuart <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> Can anyone share some accumulated wisdom about the best way to spec
> mixins in general
Hi folks,
Can anyone share some accumulated wisdom about the best way to spec
mixins in general, and (Jamis Buck-style) ActiveRecord "concerns" in
particular?
The standard situation here is that there's a bunch of functionality,
related by concept if not by implementation, that one wants to