Sha256: 41e1c820962761581699508bd07fa2bb4ab4429ced3639a28a29eed64b0b084e

Contents?: true

Size: 317 Bytes

Versions: 2

Compression:

Stored size: 317 Bytes

Contents

RSpec::Matchers.define :have_hash_accessor_for do |property|
  match do |object|
    object.send(property.to_sym)['key'] = 'value'
    expect(object.send(property.to_sym)['key']).to eq 'value'
  end

  failure_message_for_should do
    "Expected #{object} to have accessor for #{property}, but it did not."
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fake_braintree-0.6.0 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.5.0 spec/support/matchers/have_accessor_for.rb