aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-10 17:51:31 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2012-03-14 12:46:24 -0300
commit2b355757d5485beb42a4184e28621d86daced862 (patch)
treeaf0e34061855ab8a82d0e93236b4e35ebef45328 /railties
parent858a30e5716de6201087f2798f6d733cfb9b2fd7 (diff)
downloadrails-2b355757d5485beb42a4184e28621d86daced862.tar.gz
rails-2b355757d5485beb42a4184e28621d86daced862.tar.bz2
rails-2b355757d5485beb42a4184e28621d86daced862.zip
Remove duplicated tests from shared generator
[Carlos Antonio da Silva & Santiago Pastorino]
Diffstat (limited to 'railties')
-rw-r--r--railties/test/generators/app_generator_test.rb3
-rw-r--r--railties/test/generators/shared_generator_tests.rb15
2 files changed, 2 insertions, 16 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index c949d9a3b0..45f991f681 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -369,7 +369,8 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_http_only_generates_application_controller_with_action_controller_http
run_generator [destination_root, "--http-only"]
- assert_file "app/controllers/application_controller.rb", /class ApplicationController < ActionController::HTTP/
+ assert_file "app/controllers/application_controller.rb",
+ /class ApplicationController < ActionController::HTTP/
end
def test_http_only_generates_application_controller_with_protect_from_forgery_commented_out_setup
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index 14a20eddb8..92117855b7 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -91,21 +91,6 @@ module SharedGeneratorTests
assert_match(/It works!/, capture(:stdout) { generator.invoke_all })
end
- def test_template_raises_an_error_with_invalid_path
- content = capture(:stderr){ run_generator([destination_root, "-m", "non/existant/path"]) }
- assert_match(/The template \[.*\] could not be loaded/, content)
- assert_match(/non\/existant\/path/, content)
- end
-
- def test_template_is_executed_when_supplied
- path = "http://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!/, capture(: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!" }