diff options
author | Mikel Lindsaar <mikel@rubyx.com> | 2010-11-27 21:40:42 +1100 |
---|---|---|
committer | Mikel Lindsaar <mikel@rubyx.com> | 2010-11-27 22:16:15 +1100 |
commit | 667bcac439f2bf0bdd072cf9dc28658aedde5e93 (patch) | |
tree | 3b571249c9f94ad7546d7c7cdd5cb1e899cd8373 /railties/test/generators | |
parent | fd83f9d51583c080072dc9fd00f02ad742e265d4 (diff) | |
download | rails-667bcac439f2bf0bdd072cf9dc28658aedde5e93.tar.gz rails-667bcac439f2bf0bdd072cf9dc28658aedde5e93.tar.bz2 rails-667bcac439f2bf0bdd072cf9dc28658aedde5e93.zip |
Application templates should work with HTTPS too
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index d117656fbd..9e6169721b 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -113,6 +113,15 @@ module SharedGeneratorTests assert_match /It works!/, silence(:stdout){ generator.invoke_all } end + def test_template_is_executed_when_supplied_an_https_path + path = "https://gist.github.com/103208.txt" + template = %{ say "It works!" } + template.instance_eval "def read; self; end" # Make the string respond to read + + generator([destination_root], :template => path).expects(:open).with(path, 'Accept' => 'application/x-thor-template').returns(template) + 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 } |