Sha256: 5d3968ed6fa0d96c3c30b6204db1b520a6d29d6eea24a29c77983b1ab70992d7
Contents?: true
Size: 827 Bytes
Versions: 3
Compression:
Stored size: 827 Bytes
Contents
require_relative '../../../test_helper' module Troo module Persistence describe Local do let(:described_class) { Local } let(:resources) { [] } let(:resource) { stub } before { resource.stubs(:preprocess).returns(resource) } describe '.with_collection' do subject { described_class.with_collection(resources) } it { subject.must_be_instance_of(Array) } context 'when the collection is empty' do it 'returns the empty collection' do subject.must_equal [] end end context 'when the collection is not empty' do let(:resources) { [resource] } it 'returns the last persisted resource' do subject.must_equal [resource] end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
troo-0.0.15 | test/lib/troo/persistence/local_test.rb |
troo-0.0.14 | test/lib/troo/persistence/local_test.rb |
troo-0.0.13 | test/lib/troo/persistence/local_test.rb |