Sha256: 0d84ae1bac328226912cf3e199369c536aad5d2fe1bf92274a5b14bc6d151342

Contents?: true

Size: 756 Bytes

Versions: 10

Compression:

Stored size: 756 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 the output should contain "should be just like that"
    And the output should contain "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/features/custom_matchers/define_diffable_matcher.feature
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/features/custom_matchers/define_diffable_matcher.feature
rspec-expectations-2.5.0 features/custom_matchers/define_diffable_matcher.feature
rspec-expectations-2.4.0 features/custom_matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.rc features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.22 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.20 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.19 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.18 features/matchers/define_diffable_matcher.feature
rspec-expectations-2.0.0.beta.17 features/matchers/define_diffable_matcher.feature