diff options
author | José Valim <jose.valim@gmail.com> | 2011-07-07 18:58:04 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-07-07 18:58:04 -0300 |
commit | 2a24bcc6cf97fa9ecb78fa21ec23b25438d20371 (patch) | |
tree | 2cddc057141f515327a820066bcdbb110f662887 /railties/test/application | |
parent | 215193d19a89a563dcf4ce6010f9ee4a433295b4 (diff) | |
download | rails-2a24bcc6cf97fa9ecb78fa21ec23b25438d20371.tar.gz rails-2a24bcc6cf97fa9ecb78fa21ec23b25438d20371.tar.bz2 rails-2a24bcc6cf97fa9ecb78fa21ec23b25438d20371.zip |
Don't raise on mass assignment for test
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/rake_test.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index b61e2851bf..7671c129e9 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -61,22 +61,22 @@ module ApplicationTests def test_rake_test_error_output Dir.chdir(app_path){ `rake db:migrate` } - + app_file "config/database.yml", <<-RUBY development: RUBY - + app_file "test/unit/one_unit_test.rb", <<-RUBY RUBY - + app_file "test/functional/one_functional_test.rb", <<-RUBY raise RuntimeError RUBY - + app_file "test/integration/one_integration_test.rb", <<-RUBY raise RuntimeError RUBY - + silence_stderr do output = Dir.chdir(app_path){ `rake test` } assert_match /Errors running test:units! #<ActiveRecord::AdapterNotSpecified/, output @@ -151,5 +151,14 @@ module ApplicationTests assert_equal 2, ::AppTemplate::Application::Product.count assert_equal 0, ::AppTemplate::Application::User.count end + + def test_scaffold_tests_pass_by_default + content = Dir.chdir(app_path) do + `rails generate scaffold user username:string password:string` + `bundle exec rake db:migrate db:test:clone test` + end + + assert_match(/7 tests, 10 assertions, 0 failures, 0 errors/, content) + end end -end +end
\ No newline at end of file |