Sha256: b2d25c16fa657225208ef4df6115a3acadf9c9ce70781a7de4215189a5bfdc6c

Contents?: true

Size: 742 Bytes

Versions: 12

Compression:

Stored size: 742 Bytes

Contents

Feature: define diffable matcher

  When a matcher is defined as diffable, and the --diff
  flag is set, the output will include a diff of the submitted
  objects.

  Scenario: define a diffable matcher
    Given a file named "diffable_matcher_spec.rb" with:
      """
      Rspec::Matchers.define :be_just_like do |expected|
        match do |actual|
          actual == expected
        end
        
        diffable
      end

      describe "this" do
        it {should be_just_like("that")}
      end
      """
    When I run "spec diffable_matcher_spec.rb --diff"
    Then the exit code should be 256

    And the stdout should match "should be just like \"that\""
    And the stdout should match "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rspec-core-2.0.0.beta.2 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.beta.1 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a10 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a9 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a8 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a7 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a6 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a5 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a4 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a3 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a2 features-pending/matchers/define_diffable_matcher.feature
rspec-core-2.0.0.a1 features-pending/matchers/define_diffable_matcher.feature