Skip to content

Commit

Permalink
Add failing spec for #1652
Browse files Browse the repository at this point in the history
  • Loading branch information
sclinede committed Jan 9, 2020
1 parent 86a5c1f commit 731d813
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions spec/rspec/rails/example/controller_example_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,35 @@ def my_helper

example.foos_url
end

context "when controller is not a stub" do
let(:custom_contoller) do
stub_const(
"CustomController",
Class.new(ActionController::Base) do
def index
render plain: "ok"
end
end
)
end

let(:group) { group_for custom_contoller }
let(:controller) { custom_contoller }

it "properly delegates routing assertions" do
with_isolated_stderr do
example.with_routing do |map|
map.draw do
get "custom" => "custom#index"
end

expect { example.get :index }.not_to raise_error
end
end
end
end

end

describe "#bypass_rescue" do
Expand Down

0 comments on commit 731d813

Please sign in to comment.