spec/task_spec.rb in wayfarer-0.4.6 vs spec/task_spec.rb in wayfarer-0.4.7
- old
+ new
@@ -3,32 +3,11 @@
require "spec_helpers"
describe Wayfarer::Task do
subject(:task) { build(:task) }
- describe "#metadata" do
- it "returns an OpenStruct" do
- expect(task.metadata).to be_an(OpenStruct)
- end
- end
-
- describe "#barrier" do
- it "returns its batch barrier" do
- expect(task.barrier).to be_a(Wayfarer::Redis::Barrier)
- expect(task.barrier.batch).to eq(task.batch)
- end
- end
-
- describe "#counter" do
- it "returns its batch counter" do
- expect(task.counter).to be_a(Wayfarer::Redis::Counter)
- expect(task.counter.batch).to eq(task.batch)
- end
- end
-
- describe "#gc" do
- it "returns a garbage collector" do
- expect(task.gc).to be_a(Wayfarer::GC)
- expect(task.gc.task).to be(task)
+ describe "#[], #[]=" do
+ specify do
+ expect { task[:foo] = "bar" }.to change { task[:foo] }.from(nil).to("bar")
end
end
end