diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-20 07:59:28 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-11-02 17:14:50 +0100 |
commit | e51e9e2db0359355feef71e735a1f9cb764ec929 (patch) | |
tree | bf258ff3ef2c35f95a962e0b757c8008c7e706ea /railties/test | |
parent | 5c8b48ab4b9d08f3e38087214635918e659d72b6 (diff) | |
download | rails-e51e9e2db0359355feef71e735a1f9cb764ec929.tar.gz rails-e51e9e2db0359355feef71e735a1f9cb764ec929.tar.bz2 rails-e51e9e2db0359355feef71e735a1f9cb764ec929.zip |
Add --dev and --edge options to rails plugin new
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index f3672cb6f1..638ff8dce5 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -130,6 +130,19 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_match /It works!/, silence(:stdout){ generator.invoke_all } end + def test_dev_option + generator([destination_root], :dev => true).expects(:run).with("#{@bundle_command} install") + silence(:stdout){ generator.invoke_all } + rails_path = File.expand_path('../../..', Rails.root) + assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:path\s+=>\s+["']#{Regexp.escape(rails_path)}["']$/ + end + + def test_edge_option + generator([destination_root], :edge => true).expects(:run).with("#{@bundle_command} install") + silence(:stdout){ generator.invoke_all } + assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["']$/ + end + protected def action(*args, &block) |