Sha256: 929f4385228921edf736063e087a2ba0361715a61f81e0f8968b6dfda6e46bb5

Contents?: true

Size: 302 Bytes

Versions: 3

Compression:

Stored size: 302 Bytes

Contents

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fake_braintree-0.2.1 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.2.0 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.1.1 spec/support/matchers/have_accessor_for.rb