use assert_match

This commit is contained in:
maul.esel 2013-09-12 20:19:56 +02:00
parent 3a18157d20
commit f20b7d8bd2
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ Then /^the (.*) directory should exist$/ do |dir|
end
Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
assert Regexp.new(text).match(file_contents(file))
assert_match Regexp.new(text), file_contents(file)
end
Then /^I should see exactly "(.*)" in "(.*)"$/ do |text, file|
@ -154,7 +154,7 @@ Then /^I should not see "(.*)" in "(.*)"$/ do |text, file|
end
Then /^I should see escaped "(.*)" in "(.*)"$/ do |text, file|
assert Regexp.new(Regexp.escape(text)).match(file_contents(file))
assert_match Regexp.new(Regexp.escape(text)), file_contents(file)
end
Then /^the "(.*)" file should exist$/ do |file|