mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove test/dummy from gitignore when "plugin new -T"
This commit is contained in:
parent
a967487cbd
commit
1c5722cdf6
2 changed files with 9 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
|||
.bundle/
|
||||
log/*.log
|
||||
pkg/
|
||||
<% unless options[:skip_test_unit] && options[:dummy_path] == 'test/dummy' -%>
|
||||
<%= dummy_path %>/db/*.sqlite3
|
||||
<%= dummy_path %>/db/*.sqlite3-journal
|
||||
<%= dummy_path %>/log/*.log
|
||||
<%= dummy_path %>/tmp/
|
||||
<%= dummy_path %>/.sass-cache
|
||||
<% end -%>
|
|
@ -264,11 +264,14 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
assert_file "spec/dummy"
|
||||
assert_file "spec/dummy/config/application.rb"
|
||||
assert_no_file "test"
|
||||
assert_file '.gitignore' do |contents|
|
||||
assert_match(/spec\/dummy/, contents)
|
||||
end
|
||||
end
|
||||
|
||||
def test_ensure_that_gitignore_can_be_generated_from_a_template_for_dummy_path
|
||||
FileUtils.cd(Rails.root)
|
||||
run_generator([destination_root, "--dummy_path", "spec/dummy" "--skip-test-unit"])
|
||||
run_generator([destination_root, "--dummy_path", "spec/dummy", "--skip-test-unit"])
|
||||
assert_file ".gitignore" do |contents|
|
||||
assert_match(/spec\/dummy/, contents)
|
||||
end
|
||||
|
@ -280,6 +283,9 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
assert_file "bukkits.gemspec" do |contents|
|
||||
assert_no_match(/s.test_files = Dir\["test\/\*\*\/\*"\]/, contents)
|
||||
end
|
||||
assert_file '.gitignore' do |contents|
|
||||
assert_no_match(/test\dummy/, contents)
|
||||
end
|
||||
end
|
||||
|
||||
def test_skipping_gemspec
|
||||
|
|
Loading…
Reference in a new issue