Sha256: 66d869b016fe363fd2d29315b283a4dd893b198ed4a98380bf120161674a9ccc

Contents?: true

Size: 451 Bytes

Versions: 4

Compression:

Stored size: 451 Bytes

Contents

require 'test_xml'

# Adds assertions to RSpec.
TestXml::ASSERTIONS.each do |cfg|
  RSpec::Matchers.define cfg.matcher do |expected|
    match do |actual|
      TestXml::MatcherMethods.send(cfg.name, actual, expected)
    end

    failure_message_for_should do |actual|
      cfg.message_for_should.call(expected, actual)
    end

    failure_message_for_should_not do |actual|
      cfg.message_for_should_not.call(expected, actual)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
test_xml-0.1.6 lib/test_xml/spec.rb
test_xml-0.1.5 lib/test_xml/spec.rb
test_xml-0.1.4 lib/test_xml/spec.rb
test_xml-0.1.3 lib/test_xml/spec.rb