Whoops..wrong post.
should be
post :create, :organization_id => @organization.id, :new_note => { :body =>
"" }
Copying from the wrong window...
Tiffani AB
On Tue, Jul 8, 2008 at 12:14 AM, Tiffani Ashley Bell <[EMAIL PROTECTED]>
wrote:
> Yeah, I was on 1.1.4 and this solution with a few tweaks
Yeah, I was on 1.1.4 and this solution with a few tweaks definitely worked.
The original set up of my code called for having the Organization returned
by the notes controller in a before filter, so I stubbed out this stuff in
the before(:each) block. It ended up looking like this:
before(:each) d
I'm assuming RSpec 1.1.3+, but here's how I might write this example:
describe NotesController do
it "renders 'notes/new' when an empty note is submitted" do
Note.stub!(:new).and_return(stub("note"))
organization = stub_model(Organization, :notes => stub("notes",
:<< => false))
assig
Hmmm...I made the changes that both you and Britt suggested and still no
dice. I broke it down and put print statements (yeesh) in the controller
around the @organization.notes << @new_note statement. This confirms that
the statement returns false just like the stub told it to do (so I took out
On Mon, Jul 7, 2008 at 5:55 PM, Britt Mileshosky <[EMAIL PROTECTED]>
wrote:
>
>
>
> > Date: Mon, 7 Jul 2008 17:27:36 -0400
> > From: [EMAIL PROTECTED]
> > To: rspec-users@rubyforge.org
> > Subject: [rspec-users] Not sure why this controller spec isn't working
> >
>
> Date: Mon, 7 Jul 2008 17:27:36 -0400
> From: [EMAIL PROTECTED]
> To: rspec-users@rubyforge.org
> Subject: [rspec-users] Not sure why this controller spec isn't working
>
> Hey folks,
>
> I've been mocking and stubbing pretty nicely after the various bits of ad