Sha256: 766f5a7fe1b31c4e9a67c8cb9cbcc9101bd97c65c8938ec5af4695d4a2095bed

Contents?: true

Size: 607 Bytes

Versions: 114

Compression:

Stored size: 607 Bytes

Contents

require 'rails_helper'

describe LHS::Item do
  let(:item) do
    LHS::Item.new(id: 1234)
  end

  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

114 entries across 114 versions & 1 rubygems

Version Path
lhs-15.3.1.pre.fixlhc.1 spec/item/respond_to_spec.rb
lhs-15.3.0 spec/item/respond_to_spec.rb
lhs-15.2.5 spec/item/respond_to_spec.rb
lhs-15.2.4 spec/item/respond_to_spec.rb
lhs-15.2.3 spec/item/respond_to_spec.rb
lhs-15.2.3.pre.favorites.1 spec/item/respond_to_spec.rb
lhs-15.2.2.pre.favorites.1 spec/item/respond_to_spec.rb
lhs-15.2.2 spec/item/respond_to_spec.rb
lhs-15.2.1 spec/item/respond_to_spec.rb
lhs-15.2.0 spec/item/respond_to_spec.rb
lhs-15.1.1 spec/item/respond_to_spec.rb
lhs-15.1.0 spec/item/respond_to_spec.rb
lhs-15.0.2 spec/item/respond_to_spec.rb
lhs-15.0.1 spec/item/respond_to_spec.rb
lhs-15.0.0 spec/item/respond_to_spec.rb
lhs-14.6.5 spec/item/respond_to_spec.rb
lhs-14.6.4 spec/item/respond_to_spec.rb
lhs-14.6.3 spec/item/respond_to_spec.rb
lhs-14.6.2 spec/item/respond_to_spec.rb
lhs-14.6.1 spec/item/respond_to_spec.rb