Module: CLI::Kit::Support::TestHelper
- Defined in:
- lib/cli/kit/support/test_helper.rb
Defined Under Namespace
Modules: FakeConfig
Classes: FakeSuccess
Instance Method Summary
collapse
Instance Method Details
#assert_all_commands_run(should_raise: true) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/cli/kit/support/test_helper.rb', line 10
def assert_all_commands_run(should_raise: true)
errors = CLI::Kit::System.error_message
CLI::Kit::System.reset!
assert(false, errors) if should_raise && !errors.nil?
errors
end
|
#setup ⇒ Object
5
6
7
8
|
# File 'lib/cli/kit/support/test_helper.rb', line 5
def setup
super
CLI::Kit::System.reset!
end
|
#teardown ⇒ Object
17
18
19
20
|
# File 'lib/cli/kit/support/test_helper.rb', line 17
def teardown
super
assert_all_commands_run
end
|