@@ -269,6 +269,32 @@ def test_skipping_test_unit
269269 def test_skipping_gemspec
270270 run_generator [ destination_root , "--skip-gemspec" ]
271271 assert_no_file "bukkits.gemspec"
272+ assert_file "Gemfile" do |contents |
273+ assert_no_match ( 'gemspec' , contents )
274+ assert_match ( /gem "rails", "~> #{ Rails ::VERSION ::STRING } "/ , contents )
275+ assert_match ( /group :development do\n gem "sqlite3"\n end/ , contents )
276+ assert_no_match ( /# gem "jquery-rails"/ , contents )
277+ end
278+ end
279+
280+ def test_skipping_gemspec_in_full_mode
281+ run_generator [ destination_root , "--skip-gemspec" , "--full" ]
282+ assert_no_file "bukkits.gemspec"
283+ assert_file "Gemfile" do |contents |
284+ assert_no_match ( 'gemspec' , contents )
285+ assert_match ( /gem "rails", "~> #{ Rails ::VERSION ::STRING } "/ , contents )
286+ assert_match ( /group :development do\n gem "sqlite3"\n end/ , contents )
287+ assert_match ( /# gem "jquery-rails"/ , contents )
288+ assert_no_match ( /# jquery-rails is used by the dummy application\n gem "jquery-rails"/ , contents )
289+ end
290+ end
291+
292+ def test_skipping_gemspec_in_full_mode_with_javascript_option
293+ run_generator [ destination_root , "--skip-gemspec" , "--full" , "--javascript=prototype" ]
294+ assert_file "Gemfile" do |contents |
295+ assert_match ( /# gem "prototype-rails"/ , contents )
296+ assert_match ( /# jquery-rails is used by the dummy application\n gem "jquery-rails"/ , contents )
297+ end
272298 end
273299
274300 def test_creating_plugin_in_app_directory_adds_gemfile_entry
0 commit comments