@@ -46,7 +46,7 @@ Feature: anonymous controller
4646 describe "handling AccessDenied exceptions" do
4747 it "redirects to the /401.html page" do
4848 get :index
49- response.should redirect_to("/401.html")
49+ expect( response).to redirect_to("/401.html")
5050 end
5151 end
5252 end
@@ -84,7 +84,7 @@ Feature: anonymous controller
8484 describe "handling AccessDenied exceptions" do
8585 it "redirects to the /401.html page" do
8686 get :index
87- response.should redirect_to("/401.html")
87+ expect( response).to redirect_to("/401.html")
8888 end
8989 end
9090 end
@@ -113,7 +113,7 @@ Feature: anonymous controller
113113 end
114114
115115 it "creates an anonymous controller derived from ApplicationControllerSubclass" do
116- controller.should be_a_kind_of(ApplicationControllerSubclass)
116+ expect( controller).to be_a_kind_of(ApplicationControllerSubclass)
117117 end
118118 end
119119 """
@@ -144,7 +144,7 @@ Feature: anonymous controller
144144 it "invokes the callback" do
145145 get :index
146146
147- assigns[:callback_invoked].should be_true
147+ expect( assigns[:callback_invoked]).to be_true
148148 end
149149 end
150150 """
@@ -194,59 +194,59 @@ Feature: anonymous controller
194194 describe "#index" do
195195 it "responds to GET" do
196196 get :index
197- response.body.should == "index called"
197+ expect( response.body).to eq "index called"
198198 end
199199
200200 it "also responds to POST" do
201201 post :index
202- response.body.should == "index called"
202+ expect( response.body).to eq "index called"
203203 end
204204
205205 it "also responds to PUT" do
206206 put :index
207- response.body.should == "index called"
207+ expect( response.body).to eq "index called"
208208 end
209209
210210 it "also responds to DELETE" do
211211 delete :index
212- response.body.should == "index called"
212+ expect( response.body).to eq "index called"
213213 end
214214 end
215215
216216 describe "#create" do
217217 it "responds to POST" do
218218 post :create
219- response.body.should == "create called"
219+ expect( response.body).to eq "create called"
220220 end
221221
222222 # And the rest...
223223 %w{get post put delete}.each do |calltype|
224224 it "responds to #{calltype}" do
225225 send(calltype, :create)
226- response.body.should == "create called"
226+ expect( response.body).to eq "create called"
227227 end
228228 end
229229 end
230230
231231 describe "#new" do
232232 it "responds to GET" do
233233 get :new
234- response.body.should == "new called"
234+ expect( response.body).to eq "new called"
235235 end
236236
237237 # And the rest...
238238 %w{get post put delete}.each do |calltype|
239239 it "responds to #{calltype}" do
240240 send(calltype, :new)
241- response.body.should == "new called"
241+ expect( response.body).to eq "new called"
242242 end
243243 end
244244 end
245245
246246 describe "#edit" do
247247 it "responds to GET" do
248248 get :edit, :id => "anyid"
249- response.body.should == "edit called"
249+ expect( response.body).to eq "edit called"
250250 end
251251
252252 it "requires the :id parameter" do
@@ -257,15 +257,15 @@ Feature: anonymous controller
257257 %w{get post put delete}.each do |calltype|
258258 it "responds to #{calltype}" do
259259 send(calltype, :edit, {:id => "anyid"})
260- response.body.should == "edit called"
260+ expect( response.body).to eq "edit called"
261261 end
262262 end
263263 end
264264
265265 describe "#show" do
266266 it "responds to GET" do
267267 get :show, :id => "anyid"
268- response.body.should == "show called"
268+ expect( response.body).to eq "show called"
269269 end
270270
271271 it "requires the :id parameter" do
@@ -276,15 +276,15 @@ Feature: anonymous controller
276276 %w{get post put delete}.each do |calltype|
277277 it "responds to #{calltype}" do
278278 send(calltype, :show, {:id => "anyid"})
279- response.body.should == "show called"
279+ expect( response.body).to eq "show called"
280280 end
281281 end
282282 end
283283
284284 describe "#update" do
285285 it "responds to PUT" do
286286 put :update, :id => "anyid"
287- response.body.should == "update called"
287+ expect( response.body).to eq "update called"
288288 end
289289
290290 it "requires the :id parameter" do
@@ -295,15 +295,15 @@ Feature: anonymous controller
295295 %w{get post put delete}.each do |calltype|
296296 it "responds to #{calltype}" do
297297 send(calltype, :update, {:id => "anyid"})
298- response.body.should == "update called"
298+ expect( response.body).to eq "update called"
299299 end
300300 end
301301 end
302302
303303 describe "#destroy" do
304304 it "responds to DELETE" do
305305 delete :destroy, :id => "anyid"
306- response.body.should == "destroy called"
306+ expect( response.body).to eq "destroy called"
307307 end
308308
309309 it "requires the :id parameter" do
@@ -314,7 +314,7 @@ Feature: anonymous controller
314314 %w{get post put delete}.each do |calltype|
315315 it "responds to #{calltype}" do
316316 send(calltype, :destroy, {:id => "anyid"})
317- response.body.should == "destroy called"
317+ expect( response.body).to eq "destroy called"
318318 end
319319 end
320320 end
0 commit comments