Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 ee4ab3f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions railties/test/generators/plugin_generator_test.rb
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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.