1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Improve test assertion

This commit is contained in:
Stefan Sprenger 2011-05-25 15:12:54 +02:00
parent 360b98f061
commit 22be5ca8b9

View file

@ -199,7 +199,9 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
def test_skipping_test_unit
run_generator [destination_root, "--skip-test-unit"]
assert_no_file "test"
assert_no_match(/s.test_files = Dir\["test\/\*\*\/\*"\]/, File.read(File.join(destination_root, "bukkits.gemspec")))
assert_file "bukkits.gemspec" do |contents|
assert_no_match /s.test_files = Dir\["test\/\*\*\/\*"\]/, contents
end
end
def test_skipping_gemspec