spec/vmc/cli_spec.rb in vmc-0.5.1.rc4 vs spec/vmc/cli_spec.rb in vmc-0.5.1.rc5
- old
+ new
@@ -34,9 +34,16 @@
mock(context).log_error(anything)
subject
end
end
+ context "with a UserFriendlyError" do
+ let(:action) { proc { raise VMC::UserFriendlyError.new("user friendly") } }
+
+ it_behaves_like "an error that's obvious to the user",
+ :with_message => "user friendly"
+ end
+
context "with a SystemExit" do
let(:action) { proc { exit 1 } }
it_behaves_like "an error that gets passed through",
:with_exception => SystemExit