Sha256: 4182329bba15eca87ab0ca9370caeedb305399f53625ccd533d7d62386804ebc
Contents?: true
Size: 743 Bytes
Versions: 3
Compression:
Stored size: 743 Bytes
Contents
require 'rails_helper' describe LHS::Data do let(:json) do load_json(:feedbacks) end let(:data) do described_class.new(json) end context 'collections' do it 'forwards calls to the collection' do expect(data.count).to be_kind_of Fixnum expect(data[0]).to be_kind_of described_class expect(data.sample).to be_kind_of described_class end it 'provides a total method to get the number of total records' do expect(data.total).to be_kind_of Fixnum end end context 'collections from arrays' do let(:data) do described_class.new([1, 2, 3, 4]) end it 'uses collection as proxy for arrays' do expect(data._proxy).to be_kind_of LHS::Collection end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lhs-3.0.3 | spec/data/collection_spec.rb |
lhs-3.0.2 | spec/data/collection_spec.rb |
lhs-3.0.1 | spec/data/collection_spec.rb |