aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/actions_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-23 14:30:49 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-23 14:30:49 +0200
commitedd07b5a7a37783f398a156b2eb99b5b2733a0ae (patch)
treec3726e647c406d43a10109c1bb584aecdb88c2d9 /railties/test/generators/actions_test.rb
parent178044dbd2bd3ed44148e9b6d6584669aa4b2f93 (diff)
downloadrails-edd07b5a7a37783f398a156b2eb99b5b2733a0ae.tar.gz
rails-edd07b5a7a37783f398a156b2eb99b5b2733a0ae.tar.bz2
rails-edd07b5a7a37783f398a156b2eb99b5b2733a0ae.zip
Updated vendored thor to 0.11.3.
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r--railties/test/generators/actions_test.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb
index aeddb21d1f..0cda49702b 100644
--- a/railties/test/generators/actions_test.rb
+++ b/railties/test/generators/actions_test.rb
@@ -9,41 +9,6 @@ class ActionsTest < GeneratorsTestCase
@svn_plugin_uri = 'svn://svnhub.com/technoweenie/restful-authentication/trunk'
end
- def test_apply_loads_and_evaluates_a_template
- template = <<-TEMPLATE
- @foo = "FOO"
- TEMPLATE
- template.instance_eval "def read; self; end" # Make the string respond to read
-
- generator.expects(:open).with("http://gist.github.com/103208.txt").returns(template)
- action :apply, "http://gist.github.com/103208.txt"
- assert_equal generator.instance_variable_get("@foo"), "FOO"
- end
-
- def test_apply_uses_padding_in_the_applied_template
- template = <<-TEMPLATE
- say_status :cool, :padding
- TEMPLATE
- template.instance_eval "def read; self; end"
-
- generator.expects(:open).with("http://gist.github.com/103208.txt").returns(template)
- content = action(:apply, "http://gist.github.com/103208.txt")
- assert_match /cool padding/, content
- end
-
- def test_apply_does_not_log_status_if_required
- template = <<-TEMPLATE
- say_status :cool, :padding
- TEMPLATE
- template.instance_eval "def read; self; end"
-
- generator.expects(:open).with("http://gist.github.com/103208.txt").returns(template)
- content = action(:apply, "http://gist.github.com/103208.txt", :verbose => false)
-
- assert_match /cool padding/, content
- assert_no_match /apply http/, content
- end
-
def test_create_file_should_write_data_to_file_path
action :create_file, 'lib/test_file.rb', 'heres test data'
assert_file 'lib/test_file.rb', 'heres test data'