Permalink
Browse files

Add Outputter.

  • Loading branch information...
1 parent acd2b6a commit 92a4addd00cb6feb461e6b654ff7ad8d790b7c09 @gabebw gabebw committed Sep 23, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 spec/kumade/outputter_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe Kumade::Outputter, "#success" do
+ it { should respond_to(:success) }
+end
+
+describe Kumade::Outputter, "#error" do
+ before { STDOUT.stubs(:puts) }
+
+ it { should respond_to(:error) }
+
+ it "prints its message and raises its message" do
+ lambda { subject.error("I'm an error!") }.should raise_error(Kumade::DeploymentError)
+
+ STDOUT.should have_received(:puts).with(regexp_matches(/I'm an error!/))
+ end
+end

0 comments on commit 92a4add

Please sign in to comment.