features/step_definitions/path_steps.rb in pickle-0.4.11 vs features/step_definitions/path_steps.rb in pickle-0.5.0
- old
+ new
@@ -1,14 +1,14 @@
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
Then(/^(.+?) should match route \/(.+?)$/) do |page, route|
regexp = route.gsub(/:(\w*?)id/,'\d+')
- path_to(page).should =~ /#{regexp}/
+ expect(path_to(page)).to match(/#{regexp}/)
end
When(/^I go to (.+)$/) do |page|
visit path_to(page)
end
Then(/^I should be at (.+)$/) do |page|
- current_url.should =~ /#{path_to(page)}/
-end
\ No newline at end of file
+ expect(current_url).to match(/#{path_to(page)}/)
+end