spec/yads/deployer_spec.rb in yads-0.3.0.beta vs spec/yads/deployer_spec.rb in yads-0.3.1
- old
+ new
@@ -1,17 +1,17 @@
require "spec_helper"
shared_examples_for Yads::Deployer do
it "returns available commands" do
inside_project_root do
- subject.command_names.should == ["migrate", "touch"]
+ expect(subject.command_names).to eq(["migrate", "touch"])
end
end
it "returns if it has a command configured" do
inside_project_root do
- subject.should respond_to(:migrate)
+ expect(subject).to respond_to(:migrate)
end
end
it "executes the command against the server" do
inside_project_root do
@@ -27,11 +27,11 @@
it "raises an error if config is not found" do
expect do
Dir.chdir("/tmp") do
subject.setup
end
- end.should raise_error(Yads::ConfigNotFound)
+ end.to raise_error(Yads::ConfigNotFound)
end
it "executes commands against the server" do
inside_project_root do
ssh = mock
@@ -47,11 +47,11 @@
it "raises an error if config is not found" do
expect do
Dir.chdir("/tmp") do
subject.deploy
end
- end.should raise_error(Yads::ConfigNotFound)
+ end.to raise_error(Yads::ConfigNotFound)
end
it "executes commands against the server" do
inside_project_root do
ssh = mock
@@ -119,10 +119,10 @@
end
it "raises an error if environment is not configured in config file" do
expect do
inside_project_root { described_class.new("production").deploy }
- end.should raise_error(Yads::UnknowEnvironment)
+ end.to raise_error(Yads::UnknowEnvironment)
end
it_behaves_like Yads::Deployer
end