From 0afa7549e272985a06cfc6ed89b1e3de3de46115 Mon Sep 17 00:00:00 2001 From: Yossef Mendelssohn Date: Fri, 26 Oct 2012 01:53:53 -0400 Subject: [PATCH] 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. --- test/boxen_runner_test.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/boxen_runner_test.rb b/test/boxen_runner_test.rb index 67eb1c5..c08b778 100644 --- a/test/boxen_runner_test.rb +++ b/test/boxen_runner_test.rb @@ -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