mirror of
https://github.com/zhigang1992/boxen.git
synced 2026-01-12 17:12:46 +08:00
Multiple CLI projects, also using flags
What do I know about Facter? This test fails because once the fact is set, it's set. Maybe I could do something with weights in the code, but that seems silly. Probably should instead be testing this differently.
This commit is contained in:
@@ -156,7 +156,22 @@ class BoxenRunnerTest < Boxen::Test
|
||||
|
||||
runner = Boxen::Runner.new(@config, flags)
|
||||
runner.process
|
||||
|
||||
assert_equal project, Facter.value(fact)
|
||||
|
||||
|
||||
project = 'other_project'
|
||||
flags = Boxen::Flags.new('--debug', project)
|
||||
|
||||
runner = Boxen::Runner.new(@config, flags)
|
||||
runner.process
|
||||
assert_equal project, Facter.value(fact)
|
||||
|
||||
|
||||
projects = %w[my cool projects]
|
||||
flags = Boxen::Flags.new('--noop', *projects)
|
||||
|
||||
runner = Boxen::Runner.new(@config, flags)
|
||||
runner.process
|
||||
assert_equal projects.join(','), Facter.value(fact)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user