diff options
author | kennyj <kennyj@gmail.com> | 2012-06-17 02:37:00 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-06-17 02:42:53 +0900 |
commit | ee64abbf948b489ee1b3b0a3fae378b974a3db87 (patch) | |
tree | 7a1af13b8211b328338baf4e392e378e22776d90 /railties/test | |
parent | bebfa5c62b6795997bf0ee8830d64e665bc1245b (diff) | |
download | rails-ee64abbf948b489ee1b3b0a3fae378b974a3db87.tar.gz rails-ee64abbf948b489ee1b3b0a3fae378b974a3db87.tar.bz2 rails-ee64abbf948b489ee1b3b0a3fae378b974a3db87.zip |
Don't read csv file during executing db:fixtures:load.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/rake_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index eac471a07e..e0ee349550 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -122,6 +122,18 @@ module ApplicationTests assert_equal 0, ::AppTemplate::Application::User.count end + def test_loading_only_yml_fixtures + Dir.chdir(app_path) do + `rake db:migrate` + end + + app_file "test/fixtures/products.csv", "" + + require "#{rails_root}/config/environment" + errormsg = Dir.chdir(app_path) { `rake db:fixtures:load` } + assert $?.success?, errormsg + end + def test_scaffold_tests_pass_by_default output = Dir.chdir(app_path) do `rails generate scaffold user username:string password:string; |