test/unset_var_tests.rb in cap-util-0.4.0 vs test/unset_var_tests.rb in cap-util-1.0.0.rc1
- old
+ new
@@ -14,28 +14,28 @@
should "be a proc" do
assert_kind_of ::Proc, subject
end
- should "raise `DeployHalted` when called" do
- assert_raises(CapUtil::DeployHalted) { subject.call }
+ should "raise `Halted` when called" do
+ assert_raises(CapUtil::Halted) { subject.call }
end
should "raise with a default msg based on the variable name" do
exp_msg = ":#{@var_name} var not set."
begin
subject.call
- rescue CapUtil::DeployHalted => err
+ rescue CapUtil::Halted => err
assert_match exp_msg, err.message
end
end
should "accept a custom msg to raise with" do
exp_msg = ":#{@var_name} var not set (a custom err msg)."
unset = CapUtil::UnsetVar.new(@var_name, exp_msg)
begin
unset.call
- rescue CapUtil::DeployHalted => err
+ rescue CapUtil::Halted => err
assert_match exp_msg, err.message
end
end
end