Permalink
Browse files

Ensure the scaffold tests will pass when using references attributes

  • Loading branch information...
1 parent 95ccbd8 commit 190f638d398edf70fef0c32a389ed84a449bccb8 @rafaelfranca rafaelfranca committed Dec 10, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 railties/test/application/rake_test.rb
@@ -195,6 +195,16 @@ def test_scaffold_tests_pass_by_default
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

0 comments on commit 190f638

Please sign in to comment.