diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-30 16:53:08 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-30 16:53:08 -0700 |
commit | 9bc99b4fe5fb23f447483a3b031026cc121f2ab8 (patch) | |
tree | 72a55811a8bfbc32a7a379840e853b32cb8a891d /railties/test | |
parent | b0645ea04c7f75769b106d96a4fbb4e8cc2a258c (diff) | |
download | rails-9bc99b4fe5fb23f447483a3b031026cc121f2ab8.tar.gz rails-9bc99b4fe5fb23f447483a3b031026cc121f2ab8.tar.bz2 rails-9bc99b4fe5fb23f447483a3b031026cc121f2ab8.zip |
add a test for whitespace separated args in the rc file
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/argv_scrubber_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/test/generators/argv_scrubber_test.rb b/railties/test/generators/argv_scrubber_test.rb index 56df1cec02..a94350cbd7 100644 --- a/railties/test/generators/argv_scrubber_test.rb +++ b/railties/test/generators/argv_scrubber_test.rb @@ -75,6 +75,22 @@ module Rails file.unlink end + def test_rc_whitespace_separated + file = Tempfile.new 'myrcfile' + file.puts '--hello --world' + file.flush + + message = nil + scrubber = Class.new(ARGVScrubber) { + define_method(:puts) { |msg| message = msg } + }.new ['new', "--rc=#{file.path}"] + args = scrubber.prepare! + assert_equal ['--hello', '--world'], args + ensure + file.close + file.unlink + end + def test_new_rc_option file = Tempfile.new 'myrcfile' file.puts '--hello-world' |