From 190f638d398edf70fef0c32a389ed84a449bccb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 10 Dec 2012 00:35:03 -0300 Subject: Ensure the scaffold tests will pass when using references attributes --- railties/test/application/rake_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'railties/test/application') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index f2234ab111..a8275a2e76 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -195,6 +195,16 @@ module ApplicationTests assert_no_match(/Errors running/, output) end + def test_scaffold_with_references_columns_tests_pass_by_default + output = Dir.chdir(app_path) do + `rails generate scaffold LineItems product:references cart:belongs_to; + bundle exec rake db:migrate db:test:clone test` + end + + assert_match(/7 tests, 13 assertions, 0 failures, 0 errors/, output) + assert_no_match(/Errors running/, output) + end + def test_db_test_clone_when_using_sql_format add_to_config "config.active_record.schema_format = :sql" output = Dir.chdir(app_path) do -- cgit v1.2.3