Permalink
Browse files

Using activerecord-jdbcsqlite3-adapter

PluginGeneratorTest needs to have
activerecord-jdbcsqlite3-adapter to pass under JRuby
  • Loading branch information...
arunagw committed Nov 23, 2013
1 parent 5542dff commit ee4ab3fe522f0c4c3da8463c0154aa206f15a830
Showing with 10 additions and 2 deletions.
  1. +10 −2 railties/test/generators/plugin_generator_test.rb
@@ -293,7 +293,7 @@ def test_skipping_gemspec
assert_file "Gemfile" do |contents|
assert_no_match('gemspec', contents)
assert_match(/gem "rails", "~> #{Rails.version}"/, contents)
- assert_match(/group :development do\n gem "sqlite3"\nend/, contents)
+ assert_match_sqlite3(contents)
assert_no_match(/# gem "jquery-rails"/, contents)
end
end
@@ -304,7 +304,7 @@ def test_skipping_gemspec_in_full_mode
assert_file "Gemfile" do |contents|
assert_no_match('gemspec', contents)
assert_match(/gem "rails", "~> #{Rails.version}"/, contents)
- assert_match(/group :development do\n gem "sqlite3"\nend/, contents)
+ assert_match_sqlite3(contents)
end
end
@@ -347,4 +347,12 @@ def action(*args, &block)
def default_files
::DEFAULT_PLUGIN_FILES
end
+
+ def assert_match_sqlite3(contents)
+ unless defined?(JRUBY_VERSION)
+ assert_match(/group :development do\n gem "sqlite3"\nend/, contents)
+ else
+ assert_match(/group :development do\n gem "activerecord-jdbcsqlite3-adapter"\nend/, contents)
+ end
+ end
end

0 comments on commit ee4ab3f

Please sign in to comment.