Sha256: 654bd9b774dc7c6c02bd26f356e9819c97f8c8e40590beb80cb01dd29f69f503

Contents?: true

Size: 385 Bytes

Versions: 8

Compression:

Stored size: 385 Bytes

Contents

require "rspec/expectations"

RSpec::Matchers.define :have_substitution do |expected|
  match do |actual|
    actual.substitution == expected
  end

  failure_message do |actual|
    "expected the substitution #{actual.substitution}, but got #{expected}"
  end

  failure_message_when_negated do |actual|
    "expected to not receive the substitution #{actual.substitution}"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metamorpher-0.2.6 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.2.5 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.2.4 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.2.3 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.2.2 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.2.1 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.2.0 spec/support/matchers/have_substitution_matcher.rb
metamorpher-0.1.1 spec/support/matchers/have_substitution_matcher.rb