spec/middleware/controller_spec.rb in wayfarer-0.4.6 vs spec/middleware/controller_spec.rb in wayfarer-0.4.7

- old
+ new

@@ -52,31 +52,31 @@ context "without job assigned" do it "assigns itself" do expect { subject.call(task) - }.to change { task.metadata.job }.to(subject) + }.to change { task[:job] }.to(subject) end end context "with job assigned" do - before { task.metadata.job = Object.new } + before { task[:job] = Object.new } it "does not override the job" do expect { subject.call(task) - }.not_to(change { task.metadata.job }) + }.not_to(change { task[:job] }) end end it "assigns itself as controller" do expect { subject.call(task) - }.to change { task.metadata.controller }.to(subject) + }.to change { task[:controller] }.to(subject) end it "calls the chain" do - expect(subject.chain).to receive(:call) + expect(subject.class.chain).to receive(:call) subject.call(task) end it "yields" do expect { |spy| subject.call(task, &spy) }.to yield_control