features/step_definitions/common_steps.rb in engineyard-dnsimple-0.1.1 vs features/step_definitions/common_steps.rb in engineyard-dnsimple-0.1.2
- old
+ new
@@ -121,9 +121,16 @@
Then /^I should see exactly$/ do |text|
actual_output = File.read(@stdout)
actual_output.should == text
end
+Then /^I should see matching$/ do |text|
+ regexp = Regexp.new(text.gsub("(", '\(').gsub(")", '\)'))
+ actual_output = File.read(@stdout)
+ actual_output.should match(regexp)
+end
+
+
Then /^I should see all (\d+) tests pass/ do |expected_test_count|
expected = %r{^#{expected_test_count} tests, \d+ assertions, 0 failures, 0 errors}
actual_output = File.read(@stdout)
actual_output.should match(expected)
end