test/system/cap_util_tests.rb in cap-util-1.4.0 vs test/system/cap_util_tests.rb in cap-util-1.5.0
- old
+ new
@@ -1,12 +1,14 @@
require 'assert'
-require 'test/support/an_cap_util'
+require 'cap-util'
-module CapUtilSysTests
+require 'test/support/a_cap_util'
- class CapUtilTests < Assert::Context
- desc "the CapUtil module"
+module CapUtil
+
+ class ModuleSystemTests < Assert::Context
+ desc "CapUtil the module"
setup do
@mod = CapUtil
end
subject { @mod }
@@ -14,22 +16,22 @@
should have_imeths :color, :say, :say_bulleted, :say_error, :say_warning
should have_imeths :run_locally, :run_locally_with_stdin
end
- class HaltTests < CapUtilTests
- desc "`halt` util methods"
+ class HaltTests < ModuleSystemTests
+ desc "`halt` methods"
should "raise a `Halted` custom exception" do
assert_raises(CapUtil::Halted) { subject.halt }
end
end
- class CapUtilMixinTests < Assert::Context
- desc "the CapUtil mixin"
+ class MixinSystemTests < Assert::Context
+ desc "CapUtil the mixin"
setup do
- @cap_util = TestHelpers::AnCapUtil.new(CapUtil::FakeCap.new)
+ @cap_util = TestHelpers::ACapUtil.new(CapUtil::FakeCap.new)
end
subject { @cap_util }
should have_accessor :cap
@@ -49,11 +51,11 @@
should have_imeths :get, :hostname
end
- class HaltedTests < Assert::Context
- desc "the CapUtil Halted custom exception"
+ class HaltedTests < ModuleSystemTests
+ desc "Halted"
setup do
@err = CapUtil::Halted.new
end
subject { @err }