Sha256: e5dad789f6f61ef1128fa08fe3b2c2b8d778cb44941a7e3b72a451cb18554604

Contents?: true

Size: 718 Bytes

Versions: 18

Compression:

Stored size: 718 Bytes

Contents

require 'spec_helper'
require 'lhs'

describe LHS::Item do

  before(:each) do
    class Record < LHS::Record
      endpoint 'http://datastore/v2/records'
    end
  end

  context 'requires active support when dealing with Item' do

    it "does not raise an error" do
      stub_request(:get, "http://datastore/v2/records?color=blue")
        .to_return(
          body: {
            items: [{ name: 'Steve' }]
          }.to_json
        )
      Record.where(color: :blue).each do |record|
        expect(record.respond_to_missing?(:new)).to eq false
        expect(record.respond_to_missing?(:proxy_association)).to eq false
        expect(record.respond_to_missing?(:name)).to eq true
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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