Permalink
Browse files

Fix stub of user, add json as dependency for some Ruby versions

  • Loading branch information...
1 parent 012a2ad commit 7f42e6665e9e8e146f2a0230a6f880e3ba9fb021 @iain committed Apr 5, 2012
Showing with 7 additions and 6 deletions.
  1. +1 −0 capistrano-blaze.gemspec
  2. +6 −6 spec/camp_spec.rb
View
@@ -18,4 +18,5 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "rspec", "~> 2.9"
gem.add_development_dependency "webmock", "~> 1.8.4"
gem.add_development_dependency "rake", "~> 0.9.2"
+ gem.add_dependency "json"
end
View
@@ -24,24 +24,24 @@
end
before do
- subject.stub(:user) { "iain" }
+ Capistrano::Blaze::Messages.any_instance.stub(:user) { "your mom" }
end
it "displays a start message" do
- subject.should_receive(:speak).with("iain is deploying to the production stage of basecamp, via `#{command}`")
+ subject.should_receive(:speak).with("your mom is deploying to the production stage of basecamp, via `#{command}`")
context = stub(:stage => "production", :application => "basecamp")
subject.start(context)
end
it "displays a failure message" do
- subject.should_receive(:speak).with(":warning: iain failed to deploy to the production stage of basecamp, via `#{command}`: woops (RuntimeError)")
+ subject.should_receive(:speak).with(":warning: your mom failed to deploy to the production stage of basecamp, via `#{command}`: woops (RuntimeError)")
context = stub(:stage => "production", :application => "basecamp")
exception = RuntimeError.new("woops")
subject.failure(context, exception)
end
it "displays success message" do
- subject.should_receive(:speak).with("iain succesfully deployed to the production stage of basecamp, via `#{command}`")
+ subject.should_receive(:speak).with("your mom succesfully deployed to the production stage of basecamp, via `#{command}`")
context = stub(:stage => "production", :application => "basecamp")
subject.success(context)
end
@@ -53,13 +53,13 @@
end
it "displays success message without a stage" do
- subject.should_receive(:speak).with("iain succesfully deployed basecamp, via `#{command}`")
+ subject.should_receive(:speak).with("your mom succesfully deployed basecamp, via `#{command}`")
context = stub(:application => "basecamp")
subject.success(context)
end
it "displays failure message without a stage" do
- subject.should_receive(:speak).with(":warning: iain failed to deploy basecamp, via `#{command}`: woops (RuntimeError)")
+ subject.should_receive(:speak).with(":warning: your mom failed to deploy basecamp, via `#{command}`: woops (RuntimeError)")
context = stub(:application => "basecamp")
exception = RuntimeError.new("woops")
subject.failure(context, exception)

0 comments on commit 7f42e66

Please sign in to comment.