System notice: In light of the Debian OpenSSL security issue we've regenerated the server keys. See this thread for instructions and the new key fingerprints.

Commit a6c3dc3827dc4dcc25bd6192789fad046993978f

propogate controller_name in nested controller specs

Commit diff

rspec_on_rails/lib/spec/rails/example/controller_example_group.rb

 
8181 end
8282
8383 def inherited(klass) # :nodoc:
84 klass.controller_class_name = controller_class_name if controller_class_name
8485 klass.integrate_views(integrate_views?)
8586 super
8687 end
toggle raw diff

rspec_on_rails/spec/rails/example/controller_isolation_spec.rb

 
4242 end
4343
4444 describe "nested" do
45 controller_name :controller_spec
46
4745 it "should render a template" do
4846 get 'action_with_template'
4947 response.should be_success
4949 end
5050
5151 describe "with integrate_views turned off" do
52 controller_name :controller_spec
5352 integrate_views false
5453
5554 it "should not care if the template doesn't exist" do
toggle raw diff

rspec_on_rails/spec/rails/example/controller_spec_spec.rb

 
5858 controller.expect_render(:update).and_yield(template)
5959 template.should_receive(:replace).with(:bottom, "replace_me", :partial => "non_existent_partial")
6060 get 'action_with_render_update'
61 puts response.body
6261 end
6362
6463 it "should allow a path relative to RAILS_ROOT/app/views/ when specifying a partial" do
176176 end
177177end
178178
179describe "A controller spec with controller_name set", :type => :controller do
180 controller_name :controller_spec
181
182 describe "nested" do
183 it "should inherit the controller name" do
184 get 'action_with_template'
185 response.should be_success
186 end
187 end
188end
189
179190module Spec
180191 module Rails
181192 module Example
toggle raw diff