Sha256: f7fe0c3f4867295be5361b02ebfc2e0965d4ac6110fcd4750e9e1f04ab5deafb

Contents?: true

Size: 603 Bytes

Versions: 48

Compression:

Stored size: 603 Bytes

Contents

require 'rails_helper'

describe LHS::Item do
  let(:item){
    LHS::Item.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

48 entries across 48 versions & 1 rubygems

Version Path
lhs-5.4.1 spec/item/respond_to_spec.rb
lhs-5.4.0 spec/item/respond_to_spec.rb
lhs-5.3.0 spec/item/respond_to_spec.rb
lhs-5.2.0 spec/item/respond_to_spec.rb
lhs-5.1.0 spec/item/respond_to_spec.rb
lhs-5.0.4 spec/item/respond_to_spec.rb
lhs-5.0.3 spec/item/respond_to_spec.rb
lhs-5.0.1 spec/item/respond_to_spec.rb
lhs-5.0.0 spec/item/respond_to_spec.rb
lhs-4.2.1 spec/item/respond_to_spec.rb
lhs-4.2.0 spec/item/respond_to_spec.rb
lhs-4.1.0 spec/item/respond_to_spec.rb
lhs-4.0.0 spec/item/respond_to_spec.rb
lhs-3.4.2 spec/item/respond_to_spec.rb
lhs-3.4.1 spec/item/respond_to_spec.rb
lhs-3.4.0 spec/item/respond_to_spec.rb
lhs-3.3.6 spec/item/respond_to_spec.rb
lhs-3.3.5 spec/item/respond_to_spec.rb
lhs-3.3.3 spec/item/respond_to_spec.rb
lhs-3.3.2 spec/item/respond_to_spec.rb