Permalink
Browse files

Don't add sqlite3 to gemspec with -O on rails plugin new

(closes #6672)
  • Loading branch information...
1 parent 0e4d16f commit 8475cddc986d9401f1d56c511f79032b5daed7c7 @drogus drogus committed Jun 8, 2012
@@ -22,6 +22,8 @@ Gem::Specification.new do |s|
<% if full? && !options[:skip_javascript] -%>
# s.add_dependency "<%= "#{options[:javascript]}-rails" %>"
<% end -%>
+<% unless options[:skip_active_record] -%>
s.add_development_dependency "<%= gem_for_database %>"
+<% end -%>
end
@@ -89,6 +89,14 @@ def test_config_another_database
assert_file "bukkits.gemspec", /mysql/
end
+ def test_dont_generate_development_dependency
+ run_generator [destination_root, "--skip-active-record"]
+
+ assert_file "bukkits.gemspec" do |contents|
+ assert_no_match(/s.add_development_dependency "sqlite3"/, contents)
+ end
+ end
+
def test_active_record_is_removed_from_frameworks_if_skip_active_record_is_given
run_generator [destination_root, "--skip-active-record"]
assert_file "test/dummy/config/application.rb", /#\s+require\s+["']active_record\/railtie["']/

0 comments on commit 8475cdd

Please sign in to comment.