diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-16 11:17:19 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-16 11:17:19 +0200 |
commit | d6a590a7107eabd9c3ab067c60bef904da62f174 (patch) | |
tree | 31dbb4c37dfa32ec1e1eb49801681aad6e2909be /railties/test/generators | |
parent | b03034a686df5ed91d790404b27e595165883834 (diff) | |
download | rails-d6a590a7107eabd9c3ab067c60bef904da62f174.tar.gz rails-d6a590a7107eabd9c3ab067c60bef904da62f174.tar.bz2 rails-d6a590a7107eabd9c3ab067c60bef904da62f174.zip |
Modified rake tasks to use new app generator structure and updated Thor version.
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/actions_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 9a8d8075a1..aeddb21d1f 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -31,6 +31,19 @@ class ActionsTest < GeneratorsTestCase 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' |