mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't include fixtures if --skip-activerecord is given
This commit is contained in:
parent
808847792c
commit
a654ef2ee1
2 changed files with 13 additions and 1 deletions
|
@ -157,7 +157,17 @@ module Rails::Generators
|
|||
|
||||
def create_test_files
|
||||
return if options[:skip_testunit]
|
||||
directory "test"
|
||||
empty_directory "test"
|
||||
|
||||
inside "test" do
|
||||
template "test_helper.rb"
|
||||
|
||||
directory "fixtures"
|
||||
directory "functional"
|
||||
directory "integration"
|
||||
directory "performance"
|
||||
directory "unit"
|
||||
end
|
||||
end
|
||||
|
||||
def create_tmp_files
|
||||
|
|
|
@ -7,7 +7,9 @@ class ActiveSupport::TestCase
|
|||
#
|
||||
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
||||
# -- they do not yet inherit this setting
|
||||
<% unless options[:skip_activerecord] -%>
|
||||
fixtures :all
|
||||
<% end -%>
|
||||
|
||||
# Add more helper methods to be used by all tests here...
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue