aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-22 22:43:37 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-22 22:43:38 -0300
commitfe820a772ddb6d079603f1d187b6239762141229 (patch)
treebc99cfae92031083813dcff42c5f1f5320ddcee7 /railties
parentd531ac0b9afcce02d5cd81006c45dad2fb813e22 (diff)
downloadrails-fe820a772ddb6d079603f1d187b6239762141229.tar.gz
rails-fe820a772ddb6d079603f1d187b6239762141229.tar.bz2
rails-fe820a772ddb6d079603f1d187b6239762141229.zip
Stop reading the same file twice for testing different content
assert_file already gives this functionality for free by passing multiple contents.
Diffstat (limited to 'railties')
-rw-r--r--railties/test/generators/generator_generator_test.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/railties/test/generators/generator_generator_test.rb b/railties/test/generators/generator_generator_test.rb
index 41181aee85..dcfeaaa8e0 100644
--- a/railties/test/generators/generator_generator_test.rb
+++ b/railties/test/generators/generator_generator_test.rb
@@ -17,8 +17,7 @@ class GeneratorGeneratorTest < Rails::Generators::TestCase
assert_file "lib/generators/awesome/awesome_generator.rb",
/class AwesomeGenerator < Rails::Generators::NamedBase/
assert_file "test/lib/generators/awesome_generator_test.rb",
- /class AwesomeGeneratorTest < Rails::Generators::TestCase/
- assert_file "test/lib/generators/awesome_generator_test.rb",
+ /class AwesomeGeneratorTest < Rails::Generators::TestCase/,
/require 'generators\/awesome\/awesome_generator'/
end
@@ -34,8 +33,7 @@ class GeneratorGeneratorTest < Rails::Generators::TestCase
assert_file "lib/generators/rails/awesome/awesome_generator.rb",
/class Rails::AwesomeGenerator < Rails::Generators::NamedBase/
assert_file "test/lib/generators/rails/awesome_generator_test.rb",
- /class Rails::AwesomeGeneratorTest < Rails::Generators::TestCase/
- assert_file "test/lib/generators/rails/awesome_generator_test.rb",
+ /class Rails::AwesomeGeneratorTest < Rails::Generators::TestCase/,
/require 'generators\/rails\/awesome\/awesome_generator'/
end
@@ -51,8 +49,7 @@ class GeneratorGeneratorTest < Rails::Generators::TestCase
assert_file "lib/generators/awesome_generator.rb",
/class AwesomeGenerator < Rails::Generators::NamedBase/
assert_file "test/lib/generators/awesome_generator_test.rb",
- /class AwesomeGeneratorTest < Rails::Generators::TestCase/
- assert_file "test/lib/generators/awesome_generator_test.rb",
+ /class AwesomeGeneratorTest < Rails::Generators::TestCase/,
/require 'generators\/awesome_generator'/
end
@@ -68,8 +65,7 @@ class GeneratorGeneratorTest < Rails::Generators::TestCase
assert_file "lib/generators/rails/awesome_generator.rb",
/class Rails::AwesomeGenerator < Rails::Generators::NamedBase/
assert_file "test/lib/generators/rails/awesome_generator_test.rb",
- /class Rails::AwesomeGeneratorTest < Rails::Generators::TestCase/
- assert_file "test/lib/generators/rails/awesome_generator_test.rb",
+ /class Rails::AwesomeGeneratorTest < Rails::Generators::TestCase/,
/require 'generators\/rails\/awesome_generator'/
end
end