Sha256: 416163dbdb1309899e345cc55b2a1c00b8ba85168169529af2060b3034cca0d8

Contents?: true

Size: 447 Bytes

Versions: 13

Compression:

Stored size: 447 Bytes

Contents

require 'rspec'

RSpec::Matchers.define :netzke_include do |expected|
  match do |actual|
    parsed_values = actual.each_with_object({}) do | (k, v), h |
      h[k] = v == "False" ? false : v
    end
    expect(parsed_values).to include(expected.stringify_keys)
  end

  diffable
end

RSpec::Matchers.define :match_fuzzily do |expected|
  msg = nil
  match { |actual| !(msg = struct_compare(actual, expected)) }
  failure_message { |_| msg }
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
marty-2.5.2 spec/support/custom_matchers.rb
marty-2.5.1 spec/support/custom_matchers.rb
marty-2.5.0 spec/support/custom_matchers.rb
marty-2.4.9 spec/support/custom_matchers.rb
marty-2.4.8 spec/support/custom_matchers.rb
marty-2.4.7 spec/support/custom_matchers.rb
marty-2.4.6 spec/support/custom_matchers.rb
marty-2.4.5 spec/support/custom_matchers.rb
marty-2.4.4 spec/support/custom_matchers.rb
marty-2.4.3 spec/support/custom_matchers.rb
marty-2.4.2 spec/support/custom_matchers.rb
marty-2.4.1 spec/support/custom_matchers.rb
marty-2.3.15 spec/support/custom_matchers.rb