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:
Yossef Mendelssohn
2012-10-26 01:53:53 -04:00
parent 2c4c1359a9
commit 0afa7549e2

View File

@@ -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