Re: [rspec-users] Specifying mixins

2007-11-05 Thread Jim Lindley
> > 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

Re: [rspec-users] Specing raising error, handling, and then not raising error

2007-11-05 Thread Ashley Moran
On 4 Nov 2007, at 23:51, Mikel Lindsaar wrote: > The problem I was trying to solve with the mass sender is I only want > to open one connection to the SMTP server, not multiple. I thought I covered that. I didn't mock out the bit that wrapped your existing code: Net::SMTP(@host, @port, @f

Re: [rspec-users] Writing controller specs

2007-11-05 Thread Pat Maddox
Take a look at before(:each) - http://rspec.rubyforge.org/documentation/index.html Pat ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Writing controller specs

2007-11-05 Thread Russell Norris
Howdy. I've been handling this by simply stubbing out the methods as needed in the before(:each) block and then stating should_receive(:foo) when i'm actually writing spec for their behavior. RSL On 11/1/07, Hans de Graaff <[EMAIL PROTECTED]> wrote: > One thing that is bothering me about my contr