Skip to content

Commit

Permalink
update gemfiles for JRuby, and version check for method
Browse files Browse the repository at this point in the history
  • Loading branch information
Rózsa Dániel committed Jun 15, 2016
1 parent 30b0441 commit 6bd8c3d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion gemfiles/Gemfile.rails-3-1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source "http://rubygems.org"
gemspec path: '../'

gem 'activerecord', '~> 3.1.0'
gem 'mysql2', '~> 0.3.18'
unless RUBY_ENGINE == 'jruby'
gem 'mysql2', '~> 0.3.18'
end
4 changes: 3 additions & 1 deletion gemfiles/Gemfile.rails-3-2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source "http://rubygems.org"
gemspec path: '../'

gem 'activerecord', '~> 3.2.0'
gem 'mysql2', '~> 0.3.18'
unless RUBY_ENGINE == 'jruby'
gem 'mysql2', '~> 0.3.18'
end
4 changes: 3 additions & 1 deletion gemfiles/Gemfile.rails-4-0
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source "http://rubygems.org"
gemspec path: '../'

gem 'activerecord', '~> 4.0.0'
gem 'mysql2', '~> 0.3.18'
unless RUBY_ENGINE == 'jruby'
gem 'mysql2', '~> 0.3.18'
end
4 changes: 3 additions & 1 deletion gemfiles/Gemfile.rails-4-1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source "http://rubygems.org"
gemspec path: '../'

gem 'activerecord', '~> 4.1.0'
gem 'mysql2', '~> 0.3.18'
unless RUBY_ENGINE == 'jruby'
gem 'mysql2', '~> 0.3.18'
end
4 changes: 2 additions & 2 deletions spec/lib/activerecord_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
let(:table_name) { :test_uuid_field_creation }

before do
connection.drop_table(table_name) if connection.data_source_exists?(table_name)
connection.drop_table(table_name) if (ActiveRecord::VERSION::MAJOR.eql?(5) ? connection.data_source_exists?(table_name) : connection.table_exists?(table_name) )
connection.create_table(table_name)
end

after do
connection.drop_table table_name
end

specify { connection.data_source_exists?(table_name).should be_truthy }
specify { (ActiveRecord::VERSION::MAJOR.eql?(5) ? connection.data_source_exists?(table_name) : connection.table_exists?(table_name) ).should be_truthy }

context '#add_column' do
let(:column_name) { :uuid_column }
Expand Down

0 comments on commit 6bd8c3d

Please sign in to comment.