Re: [rspec-users] "unit" vs. "functional" specs

2010-12-19 Thread Andrew Premdas
When doing BDD, especially at the start, I found it really easy to write more code than you need to, when implementing a particular functional spec. I also found it really easy to miss the point where you should move into the inner cycle (unit cycle). Using the unit test coverage metric to make su

Re: [rspec-users] Rspec & Rails Nested Resources

2010-12-19 Thread Daniel C.
Thanks for your response Pat - I ended up taking the stub_chain method which got it working. For anyone interested this is my new test: it "GET new" do @correspondence = mock_model(Correspondence) @job.stub_chain(:correspondences, :build).and_return(@correspondence) get :new