We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86a5c1f commit ac01b7cCopy full SHA for ac01b7c
spec/rspec/rails/example/controller_example_group_spec.rb
@@ -90,6 +90,35 @@ def my_helper
90
91
example.foos_url
92
end
93
+
94
+ context "when controller is not a stub" do
95
+ let(:custom_contoller) do
96
+ stub_const(
97
+ 'CustomController',
98
+ Class.new(ActionController::Base) do
99
+ def index
100
+ render plain: "ok"
101
+ end
102
103
+ )
104
105
106
+ let(:group) { group_for custom_contoller }
107
+ let(:controller) { custom_contoller }
108
109
+ it "properly delegates routing assertions" do
110
+ with_isolated_stderr do
111
+ example.with_routing do |map|
112
+ map.draw do
113
+ get 'custom' => "custom#index"
114
115
116
+ expect { example.get :index }.not_to raise_error
117
118
119
120
121
122
123
124
describe "#bypass_rescue" do
0 commit comments