Sha256: 25fd2f88791ae086876166fca280eeaad9ddbae7be04f68d96ed05969d91ca9f
Contents?: true
Size: 609 Bytes
Versions: 3
Compression:
Stored size: 609 Bytes
Contents
require 'rails_helper' describe LHS::Item do let(:item){ described_class.new(id: 1234) } context '#respond_to?' do it 'is true for setters' do expect(item.respond_to?(:id=)).to be(true) end it 'is true for getters' do expect(item.respond_to?(:id)).to be(true) end it 'is true for brackets' do expect(item.respond_to?(:[])).to be(true) end it 'is false for new' do expect(item.respond_to?(:new)).to be(false) end it 'is false for proxy_association' do expect(item.respond_to?(:proxy_association)).to be(false) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lhs-3.0.3 | spec/item/respond_to_spec.rb |
lhs-3.0.2 | spec/item/respond_to_spec.rb |
lhs-3.0.1 | spec/item/respond_to_spec.rb |