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-16.1.5 spec/item/respond_to_spec.rb
lhs-16.1.4 spec/item/respond_to_spec.rb
lhs-16.1.3 spec/item/respond_to_spec.rb
lhs-16.1.2 spec/item/respond_to_spec.rb
lhs-16.1.1 spec/item/respond_to_spec.rb
lhs-16.1.0 spec/item/respond_to_spec.rb
lhs-16.0.1 spec/item/respond_to_spec.rb
lhs-16.0.0 spec/item/respond_to_spec.rb
lhs-15.7.0 spec/item/respond_to_spec.rb
lhs-15.6.1 spec/item/respond_to_spec.rb
lhs-15.6.0 spec/item/respond_to_spec.rb
lhs-15.5.1 spec/item/respond_to_spec.rb
lhs-15.5.0 spec/item/respond_to_spec.rb
lhs-15.4.1 spec/item/respond_to_spec.rb
lhs-15.4.0 spec/item/respond_to_spec.rb
lhs-15.4.0.pre.hasone.1 spec/item/respond_to_spec.rb
lhs-15.3.3 spec/item/respond_to_spec.rb
lhs-15.3.3.pre.fixoptions.1 spec/item/respond_to_spec.rb
lhs-15.3.2 spec/item/respond_to_spec.rb
lhs-15.3.1 spec/item/respond_to_spec.rb