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

Add test for gemspec of the generated engine

This commit is contained in:
Stefan Sprenger 2011-05-24 09:30:23 +02:00
parent e3d7751b54
commit 855d14dd94

View file

@ -169,6 +169,12 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
assert_file "app/views/layouts/bukkits/application.html.erb", /<title>Bukkits<\/title>/
end
def test_creating_gemspec
assert_file "bukkits.gemspec", /s.name = "bukkits"/
assert_file "bukkits.gemspec", /s.files = Dir["{app,config,lib}\/**\/*"]/
assert_file "bukkits.gemspec", /s.version = "0.0.1"/
end
def test_passing_dummy_path_as_a_parameter
run_generator [destination_root, "--dummy_path", "spec/dummy"]
assert_file "spec/dummy"