aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/plugin_generator_test.rb
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2013-11-23 11:38:54 +0100
committerArun Agrawal <arunagw@gmail.com>2013-11-23 11:41:27 +0100
commitee4ab3fe522f0c4c3da8463c0154aa206f15a830 (patch)
tree7f030b8fcadcb63d6d1d76fd1d9f1602a625578b /railties/test/generators/plugin_generator_test.rb
parent5542dff88a8581675c9324c8184cc80df99e3325 (diff)
downloadrails-ee4ab3fe522f0c4c3da8463c0154aa206f15a830.tar.gz
rails-ee4ab3fe522f0c4c3da8463c0154aa206f15a830.tar.bz2
rails-ee4ab3fe522f0c4c3da8463c0154aa206f15a830.zip
Using activerecord-jdbcsqlite3-adapter
PluginGeneratorTest needs to have activerecord-jdbcsqlite3-adapter to pass under JRuby
Diffstat (limited to 'railties/test/generators/plugin_generator_test.rb')
-rw-r--r--railties/test/generators/plugin_generator_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index 068eb66bc6..c6b91e7cba 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -293,7 +293,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
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 @@ class PluginGeneratorTest < Rails::Generators::TestCase
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 @@ protected
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