mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Stop reading the same file twice for testing different content
assert_file already gives this functionality for free by passing multiple contents.
This commit is contained in:
parent
d531ac0b9a
commit
fe820a772d
1 changed files with 4 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue