spec/adhoq/storage_spec.rb in adhoq-0.0.5 vs spec/adhoq/storage_spec.rb in adhoq-0.0.6
- old
+ new
@@ -23,7 +23,21 @@
storage.store('.txt') { StringIO.new("Hello adhoq!\n") }
end
specify { expect(storage.get(identifier)).to eq "Hello adhoq!\n" }
end
+
+ describe Storage::OnTheFly do
+ let(:storage) { Storage::OnTheFly.new }
+
+ let!(:identifier) do
+ storage.store('.txt') { StringIO.new("Hello adhoq!\n") }
+ end
+
+ specify { expect(storage.get(identifier)).to eq "Hello adhoq!\n" }
+
+ specify do
+ expect { storage.get(identifier) }.to change { storage.reports.size }.by(-1)
+ end
+ end
end
end