Sha256: d7e32aea5b70f60602fccace1812658a466ca3dce9700c749202f4b94a3fc2f0

Contents?: true

Size: 767 Bytes

Versions: 7

Compression:

Stored size: 767 Bytes

Contents

Feature: define diffable matcher

  When a matcher is defined as diffable, the output will include a diff of the submitted
  objects when the objects are more than simple primitives.

  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

      RSpec.describe "two\nlines" do
        it { is_expected.to be_just_like("three\nlines") }
      end
      """
    When I run `rspec ./diffable_matcher_spec.rb`
    Then it should fail with:
      """
             Diff:
             @@ -1,3 +1,3 @@
             -three
             +two
              lines
      """

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
opal-rspec-0.8.0 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature
opal-rspec-0.8.0.alpha3 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature
opal-rspec-0.8.0.alpha2 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature
opal-rspec-0.8.0.alpha1 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature
opal-rspec-0.7.1 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature
opal-rspec-0.7.0 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature
opal-rspec-0.7.0.rc.2 rspec-expectations/upstream/features/custom_matchers/define_diffable_matcher.feature