Sha256: 7459b7389253146049bc500add8478d7044e29f0c3c2971803ce73297801b337

Contents?: true

Size: 313 Bytes

Versions: 7

Compression:

Stored size: 313 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_for_should do
    "Expected #{object} to have accessor for #{property}, but it did not."
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fake_braintree-0.4.3 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.4.2 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.4.1 spec/support/matchers/have_accessor_for.rb
fake_paymill-0.0.2 spec/support/matchers/have_accessor_for.rb
fake_paymill-0.0.1 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.4 spec/support/matchers/have_accessor_for.rb
fake_braintree-0.3 spec/support/matchers/have_accessor_for.rb