test/lib/vedeu/repositories/collection_test.rb in vedeu-0.4.40 vs test/lib/vedeu/repositories/collection_test.rb in vedeu-0.4.41
- old
+ new
@@ -24,10 +24,16 @@
it { instance.must_respond_to(:parent=) }
it { instance.must_respond_to(:name) }
it { instance.must_respond_to(:name=) }
end
+ describe '.coerce' do
+ subject { described.coerce(collection, parent, model_name) }
+
+ # it { skip }
+ end
+
describe '#[]' do
let(:collection) { [:hydrogen, :helium, :lithium, :beryllium] }
let(:_value) { 1..2 }
subject { instance[_value] }
@@ -37,9 +43,10 @@
end
describe '#add' do
subject { instance.add(:hydrogen) }
+ it { instance.must_respond_to(:<<) }
it { subject.must_be_instance_of(Collection) }
it { subject.all.must_equal([:hydrogen]) }
context 'with multiple objects' do
subject { instance.add(:hydrogen, :helium) }