From d6a590a7107eabd9c3ab067c60bef904da62f174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 16 Jul 2009 11:17:19 +0200 Subject: Modified rake tasks to use new app generator structure and updated Thor version. --- railties/test/generators/actions_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'railties/test/generators') 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' -- cgit v1.2.3