spec/task_spec.rb in shuttle-deploy-0.3.0.beta1 vs spec/task_spec.rb in shuttle-deploy-0.3.0
- old
+ new
@@ -1,10 +1,10 @@
require "spec_helper"
describe Shuttle::Task do
- let(:config) { double(tasks: tasks) }
- let(:deploy) { double(config: config) }
+ let(:config) { double(:tasks => tasks) }
+ let(:deploy) { double(:config => config) }
let(:task) { described_class.new(deploy, "foo") }
before do
allow(task).to receive(:execute)
end
@@ -21,11 +21,11 @@
expect { task.run }.to raise_error Shuttle::DeployError
end
end
context "when task does not have commands" do
- let(:tasks) { Hashr.new(foo: []) }
+ let(:tasks) { Hashr.new(:foo => []) }
before do
task.run
end
@@ -33,10 +33,10 @@
expect(task).to have_received(:execute).exactly(0).times
end
end
context "when task has commands" do
- let(:tasks) { Hashr.new(foo: ["cmd1", "cmd2"]) }
+ let(:tasks) { Hashr.new(:foo => ["cmd1", "cmd2"]) }
before do
task.run
end
\ No newline at end of file