[rspec-devel] [ rspec-Feature Requests-10718 ] Add :locals hash to 'it_should_behave_like' method (SharedBehavior)

noreply at rubyforge.org noreply at rubyforge.org
Wed May 9 10:36:31 EDT 2007


Feature Requests item #10718, was opened at 2007-05-09 10:36
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10718&group_id=797

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Chris Hoffman (hoffman_c)
Assigned to: Nobody (None)
Summary: Add :locals hash to 'it_should_behave_like' method (SharedBehavior)

Initial Comment:
It would be great if we could pass arbitrary variables into the shared behavior specs, for things such as differing controller actions.  Right now, I'm having to do the following:

before(:all) do
   @action = "foo"
end
it_should_behave_like "CRUD"

Instead, I could imagine something like the following, a la partial locals:

it_should_behave_like "CRUD", :locals => { :action => "foo" }

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10718&group_id=797


More information about the rspec-devel mailing list