Sha256: d0c0de608dc3ca426c84e0d3ad38d260d974fce87e2c9abb9e2ceb5affb7f4ff

Contents?: true

Size: 184 Bytes

Versions: 9

Compression:

Stored size: 184 Bytes

Contents

require 'rspec/expectations'

RSpec::Matchers.define :have_accessor do |accessor|
  match do |obj|
    obj.respond_to?(accessor.to_s) && obj.respond_to?("#{accessor.to_s}=")
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cell_set-0.2.3 spec/support/matchers/have_accessor.rb
cell_set-0.2.2 spec/support/matchers/have_accessor.rb
cell_set-0.2.1 spec/support/matchers/have_accessor.rb
cell_set-0.2.0 spec/support/matchers/have_accessor.rb
cell_set-0.1.4 spec/support/matchers/have_accessor.rb
cell_set-0.1.3 spec/support/matchers/have_accessor.rb
cell_set-0.1.2 spec/support/matchers/have_accessor.rb
cell_set-0.1.1 spec/support/matchers/have_accessor.rb
cell_set-0.1.0 spec/support/matchers/have_accessor.rb