Skip to content

Commit a9adc65

Browse files
committed
Add failing spec for #1652
1 parent 86a5c1f commit a9adc65

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

spec/rspec/rails/example/controller_example_group_spec.rb

+24
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,30 @@ def my_helper
9090

9191
example.foos_url
9292
end
93+
94+
context "when controller is not a stub" do
95+
class SomeController < ActionController::Base
96+
def index
97+
render text: 'ok'
98+
end
99+
end
100+
101+
let(:group) { group_for SomeController }
102+
let(:controller) { SomeController }
103+
104+
it "properly delegates routing assertions" do
105+
with_isolated_stderr do
106+
example.with_routing do |map|
107+
map.draw do
108+
get 'some/index' => "r_spec/rails/some#index"
109+
end
110+
111+
expect { example.get :index }.not_to raise_error
112+
end
113+
end
114+
end
115+
end
116+
93117
end
94118

95119
describe "#bypass_rescue" do

0 commit comments

Comments
 (0)