From b37391d1a7a0cd0aac82d6e76b2251e09d8f1fcc Mon Sep 17 00:00:00 2001 From: kbparagua Date: Tue, 24 Mar 2015 22:01:18 +0800 Subject: [PATCH] Adjust advanced spec --- test_app/spec/integration/advanced_spec.rb | 38 ++++++++++++---------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/test_app/spec/integration/advanced_spec.rb b/test_app/spec/integration/advanced_spec.rb index 0f8fc2d..c0d7cee 100644 --- a/test_app/spec/integration/advanced_spec.rb +++ b/test_app/spec/integration/advanced_spec.rb @@ -13,10 +13,11 @@ feature 'executing Paloma controller', :js => true do it 'executes the same namespace/controller/action' do visit admin_foos_path - expect(request).to eq({ - 'controller' => 'Admin/Foos', - 'action' => 'index', - 'params' => {}}) + expect( + request['controller'] == 'Admin/Foos' && + request['action'] == 'index' && + request['params'] == {} + ).to be_truthy end end @@ -25,10 +26,11 @@ feature 'executing Paloma controller', :js => true do it 'executes the specified controller' do visit admin_foo_path(1) - expect(request).to eq({ - 'controller' => 'NotAdmin/Foos', - 'action' => 'show', - 'params' => {'x' => 99}}) + expect( + request['controller'] == 'NotAdmin/Foos' && + request['action'] == 'show' && + request['params'] == {'x' => 99} + ).to be_truthy end end @@ -37,10 +39,11 @@ feature 'executing Paloma controller', :js => true do it 'executes the specified action' do visit new_admin_foo_path - expect(request).to eq({ - 'controller' => 'Admin/Foos', - 'action' => 'otherAction', - 'params' => {'x' => 99}}) + expect( + request['controller'] == 'Admin/Foos' && + request['action'] == 'otherAction' && + request['params'] == {'x' => 99} + ).to be_truthy end end @@ -49,12 +52,13 @@ feature 'executing Paloma controller', :js => true do it 'executes the specified controller/action' do visit edit_admin_foo_path(1) - expect(request).to eq({ - 'controller' => 'NotAdmin/Foos', - 'action' => 'otherAction', - 'params' => {'x' => 99}}) + expect( + request['controller'] == 'NotAdmin/Foos' && + request['action'] == 'otherAction' && + request['params'] == {'x' => 99} + ).to be_truthy end end -end \ No newline at end of file +end