Re: [rspec-users] shared examples with a block for expects?

2012-05-23 Thread Justin Ko
On May 23, 2012, at 6:12 PM, Patrick J. Collins wrote: > Hi, > > Basically I want to do something like this: > > describe FancyThingsController do > > def do_new >get :new > end > > def do_create >post :create, :fancy_thing => { :some => "params" } > end > > shared_examples "an

Re: [rspec-users] received unexpected message :id= with (20)

2012-05-23 Thread Justin Ko
On May 23, 2012, at 4:27 PM, Kleber Shimabuku wrote: > Please help me to understand this error message: > > 1) PostsController#create when logged in should create a new post and > redirect to a successful message page > Failure/Error: post 'create', { post: {title: 'New post', > Mock P

[rspec-users] shared examples with a block for expects?

2012-05-23 Thread Patrick J. Collins
Hi, Basically I want to do something like this: describe FancyThingsController do def do_new get :new end def do_create post :create, :fancy_thing => { :some => "params" } end shared_examples "an access controlled action" do |expectation| it "denies access" do expec

[rspec-users] received unexpected message :id= with (20)

2012-05-23 Thread Kleber Shimabuku
Please help me to understand this error message: 1) PostsController#create when logged in should create a new post and redirect to a successful message page Failure/Error: post 'create', { post: {title: 'New post', Mock Post(id: integer, title: string, description: text, location: str