Sha256: 18c46af3f5c4efb149fd5c6d620652ad9c2cfdaf77a18dbe5c7617a5f946bec8

Contents?: true

Size: 611 Bytes

Versions: 26

Compression:

Stored size: 611 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

26 entries across 26 versions & 1 rubygems

Version Path
lhs-2.2.2 spec/item/respond_to_spec.rb
lhs-1.6.1 spec/item/respond_to_spec.rb
lhs-2.2.1 spec/item/respond_to_spec.rb
lhs-2.2.0 spec/item/respond_to_spec.rb
lhs-1.6.0 spec/item/respond_to_spec.rb
lhs-2.1.1 spec/item/respond_to_spec.rb
lhs-3.0.0 spec/item/respond_to_spec.rb
lhs-2.1.0 spec/item/respond_to_spec.rb
lhs-2.0.5 spec/item/respond_to_spec.rb
lhs-2.0.4 spec/item/respond_to_spec.rb
lhs-2.0.3 spec/item/respond_to_spec.rb
lhs-2.0.2 spec/item/respond_to_spec.rb
lhs-2.0.1 spec/item/respond_to_spec.rb
lhs-2.0.0 spec/item/respond_to_spec.rb
lhs-1.5.0 spec/item/respond_to_spec.rb
lhs-1.4.0 spec/item/respond_to_spec.rb
lhs-1.3.1 spec/item/respond_to_spec.rb
lhs-1.3.0 spec/item/respond_to_spec.rb
lhs-1.2.3 spec/item/respond_to_spec.rb
lhs-1.2.2 spec/item/respond_to_spec.rb