diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-30 15:49:47 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-30 15:49:47 -0700 |
commit | 169fa516c3178077eb9a35fa757063de936be53c (patch) | |
tree | d1a3ab4de025f8299e44af60d9e2687722a8a619 /railties | |
parent | 7d01907f95ec2fdbf1b5641987396193277e64c3 (diff) | |
download | rails-169fa516c3178077eb9a35fa757063de936be53c.tar.gz rails-169fa516c3178077eb9a35fa757063de936be53c.tar.bz2 rails-169fa516c3178077eb9a35fa757063de936be53c.zip |
change the test to make argv a little more realistic
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/argv_scrubber_test.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/railties/test/generators/argv_scrubber_test.rb b/railties/test/generators/argv_scrubber_test.rb index 6030139d88..97aa1bce52 100644 --- a/railties/test/generators/argv_scrubber_test.rb +++ b/railties/test/generators/argv_scrubber_test.rb @@ -84,17 +84,16 @@ module Rails def test_new_rc_option_and_custom_options file = Tempfile.new 'myrcfile' - file.puts '--hello-world' + file.puts '--hello' + file.puts '--world' file.flush - message = nil scrubber = Class.new(ARGVScrubber) { - define_method(:puts) { |msg| message = msg } - }.new ['new', '--tender', '--love', "--rc=#{file.path}"] + define_method(:puts) { |msg| } + }.new ['new', 'tenderapp', '--love', "--rc=#{file.path}"] + args = scrubber.prepare! - assert_equal ['--tender', '--hello-world', '--love'], args - assert_match 'hello-world', message - assert_match file.path, message + assert_equal ["tenderapp", "--hello", "--world", "--love"], args ensure file.close file.unlink |