Re: [rspec-users] Stubbing out common setup

2010-12-24 Thread David Chelimsky
On Wed, Dec 22, 2010 at 2:28 PM, Suman Gurung wrote: > I want to stub an after save method(which generates files and so, is > time consuming), for most of my spec files apart from a few where that > method is actually tested. > I was trying to do this with using shared examples but with rspec 2, i

Re: [rspec-users] View Specs

2010-12-24 Thread David Chelimsky
On Wed, Dec 22, 2010 at 12:58 PM, Daryn wrote: > Hi, > > I was using WebRat and I had view specs that looked like this: > > describe "expenses/new.html.erb" do >  it "displays 'New Expense'" do >    render >    rendered.should include("New Expense") >  end > end > > I am now using Capybara and you

[rspec-users] Inconsistent Test results w/ Autotest vs just rspec ./spec

2010-12-24 Thread JDeville
Problem --- When I run autotest against my rails 3 app, I get some errors that seem to imply that my @ variables are not be cleared for each context. It happens only in my controller tests, but that may simply be a coincidence. When autotest t

[rspec-users] Stubbing out common setup

2010-12-24 Thread Suman Gurung
I want to stub an after save method(which generates files and so, is time consuming), for most of my spec files apart from a few where that method is actually tested. I was trying to do this with using shared examples but with rspec 2, i believe before(:each) defined in the shared examples are auto

[rspec-users] View Specs

2010-12-24 Thread Daryn
Hi, I was using WebRat and I had view specs that looked like this: describe "expenses/new.html.erb" do it "displays 'New Expense'" do render rendered.should include("New Expense") end end I am now using Capybara and you cannot use those matchers in View Specs. What should my view spe