Sha256: 8a802cee31ee1ada85cc4018252f6fb82388acb5def4238f4f0dc46441e0065a

Contents?: true

Size: 728 Bytes

Versions: 6

Compression:

Stored size: 728 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.

  @wip
  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 "rspec diffable_matcher_spec.rb --diff"
    Then the exit status should not be 0

    And I should see "should be just like that"
    And I should see "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rspec-expectations-2.0.0.beta.8 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.7 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.6 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.5 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.4 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.3 features/matchers/define_diffable_matcher.feature