features/matchers/define_matcher.feature in rspec-1.2.8 vs features/matchers/define_matcher.feature in rspec-1.2.9

- old
+ new

@@ -33,18 +33,18 @@ """ When I run "spec matcher_with_default_message_spec.rb --format specdoc" Then the exit code should be 256 - And the stdout should match "should be a multiple of 3" - And the stdout should match "should not be a multiple of 4" - And the stdout should match "should be a multiple of 4 (FAILED - 1)" - And the stdout should match "should not be a multiple of 3 (FAILED - 2)" + And the stdout should include "should be a multiple of 3" + And the stdout should include "should not be a multiple of 4" + And the stdout should include "should be a multiple of 4 (FAILED - 1)" + And the stdout should include "should not be a multiple of 3 (FAILED - 2)" - And the stdout should match "4 examples, 2 failures" - And the stdout should match "expected 9 to be a multiple of 4" - And the stdout should match "expected 9 not to be a multiple of 3" + And the stdout should include "4 examples, 2 failures" + And the stdout should include "expected 9 to be a multiple of 4" + And the stdout should include "expected 9 not to be a multiple of 3" Scenario: overriding the failure_message_for_should Given a file named "matcher_with_failure_message_spec.rb" with: """ Spec::Matchers.define :be_a_multiple_of do |expected| @@ -61,12 +61,12 @@ it {should be_a_multiple_of(4)} end """ When I run "spec matcher_with_failure_message_spec.rb" Then the exit code should be 256 - And the stdout should match "1 example, 1 failure" - And the stdout should match "expected that 9 would be a multiple of 4" + And the stdout should include "1 example, 1 failure" + And the stdout should include "expected that 9 would be a multiple of 4" Scenario: overriding the failure_message_for_should_not Given a file named "matcher_with_failure_for_message_spec.rb" with: """ Spec::Matchers.define :be_a_multiple_of do |expected| @@ -83,12 +83,12 @@ it {should_not be_a_multiple_of(3)} end """ When I run "spec matcher_with_failure_for_message_spec.rb" Then the exit code should be 256 - And the stdout should match "1 example, 1 failure" - And the stdout should match "expected that 9 would not be a multiple of 3" + And the stdout should include "1 example, 1 failure" + And the stdout should include "expected that 9 would not be a multiple of 3" Scenario: overriding the description Given a file named "matcher_overriding_description_spec.rb" with: """ Spec::Matchers.define :be_a_multiple_of do |expected| @@ -108,13 +108,13 @@ it {should_not be_a_multiple_of(4)} end """ When I run "spec matcher_overriding_description_spec.rb --format specdoc" Then the exit code should be 0 - And the stdout should match "2 examples, 0 failures" - And the stdout should match "should be multiple of 3" - And the stdout should match "should not be multiple of 4" + And the stdout should include "2 examples, 0 failures" + And the stdout should include "should be multiple of 3" + And the stdout should include "should not be multiple of 4" Scenario: with no args Given a file named "matcher_with_no_args_spec.rb" with: """ Spec::Matchers.define :have_7_fingers do @@ -131,12 +131,12 @@ it {should have_7_fingers} end """ When I run "spec matcher_with_no_args_spec.rb --format specdoc" Then the exit code should be 0 - And the stdout should match "1 example, 0 failures" - And the stdout should match "should have 7 fingers" + And the stdout should include "1 example, 0 failures" + And the stdout should include "should have 7 fingers" Scenario: with multiple args Given a file named "matcher_with_multiple_args_spec.rb" with: """ Spec::Matchers.define :be_the_sum_of do |a,b,c,d| @@ -149,12 +149,12 @@ it {should be_the_sum_of(1,2,3,4)} end """ When I run "spec matcher_with_multiple_args_spec.rb --format specdoc" Then the exit code should be 0 - And the stdout should match "1 example, 0 failures" - And the stdout should match "should be the sum of 1, 2, 3, and 4" + And the stdout should include "1 example, 0 failures" + And the stdout should include "should be the sum of 1, 2, 3, and 4" Scenario: with helper methods Given a file named "matcher_with_internal_helper_spec.rb" with: """ Spec::Matchers.define :have_same_elements_as do |sample| @@ -173,7 +173,7 @@ end end """ When I run "spec matcher_with_internal_helper_spec.rb" Then the exit code should be 0 - And the stdout should match "1 example, 0 failures" + And the stdout should include "1 example, 0 failures"