Permalink
Browse files

Improve test assertion

  • Loading branch information...
Stefan Sprenger
Stefan Sprenger committed May 25, 2011
1 parent 360b98f commit 22be5ca8b91b1ee8bf2aeb8ae29a64a45968ac24
Showing with 3 additions and 1 deletion.
  1. +3 −1 railties/test/generators/plugin_new_generator_test.rb
@@ -199,7 +199,9 @@ def test_creating_dummy_without_tests_but_with_dummy_path
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

0 comments on commit 22be5ca

Please sign in to comment.