Sha256: 464dfeeae05a23d9105d296cd7433f1823086bfe469c3c57ba0bf12647e5098f

Contents?: true

Size: 760 Bytes

Versions: 13

Compression:

Stored size: 760 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:
      """ruby
      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

13 entries across 13 versions & 7 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature
sshp-0.0.1 vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.12.1/features/custom_matchers/define_diffable_matcher.feature
vagrant-actionio-0.0.9 vendor/bundle/gems/rspec-expectations-2.13.0/features/custom_matchers/define_diffable_matcher.feature
rspec-expectations-2.13.0 features/custom_matchers/define_diffable_matcher.feature
remq-0.0.4 vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_diffable_matcher.feature
remq-0.0.3 vendor/bundle/gems/rspec-expectations-2.12.1/features/custom_matchers/define_diffable_matcher.feature
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.12.1/features/custom_matchers/define_diffable_matcher.feature
rspec-expectations-2.12.1 features/custom_matchers/define_diffable_matcher.feature
rspec-expectations-2.12.0 features/custom_matchers/define_diffable_matcher.feature