From fb4e736ae187fd32745eb950920fb3e0622068e6 Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Thu, 17 Oct 2013 13:35:00 -0400 Subject: [PATCH 1/5] Setting join_table on AR tests --- test/fixtures/active_record.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures/active_record.rb b/test/fixtures/active_record.rb index 8df19059a..6ae75f43a 100644 --- a/test/fixtures/active_record.rb +++ b/test/fixtures/active_record.rb @@ -38,13 +38,13 @@ class ARPost < ActiveRecord::Base has_many :ar_comments, class_name: 'ARComment' - has_and_belongs_to_many :ar_tags, class_name: 'ARTag' + has_and_belongs_to_many :ar_tags, class_name: 'ARTag', join_table: :ar_posts_tags belongs_to :ar_section, class_name: 'ARSection' end class ARComment < ActiveRecord::Base belongs_to :ar_post, class_name: 'ARPost' - has_and_belongs_to_many :ar_tags, class_name: 'ARTag' + has_and_belongs_to_many :ar_tags, class_name: 'ARTag', join_table: :ar_comments_tags end class ARTag < ActiveRecord::Base From ad82f1cadd271917230cf47914ed5232275811d9 Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Thu, 17 Oct 2013 13:35:44 -0400 Subject: [PATCH 2/5] Add rails3 Gemfile Also point the main Gemfile to rails4 --- Gemfile | 2 ++ Gemfile.rails3 | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 Gemfile.rails3 diff --git a/Gemfile b/Gemfile index 6e810339a..00cd24d99 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,5 @@ gemspec gem 'sqlite3' gem 'coveralls', :require => false gem 'simplecov', :require => false + +gem 'rails', "~> 4.0.0" diff --git a/Gemfile.rails3 b/Gemfile.rails3 new file mode 100644 index 000000000..7afd09417 --- /dev/null +++ b/Gemfile.rails3 @@ -0,0 +1,10 @@ +source 'https://rubygems.org' + +# Specify gem dependencies in active_model_serializers.gemspec +gemspec + +gem 'sqlite3' +gem 'coveralls', :require => false +gem 'simplecov', :require => false + +gem 'rails', "~> 3.2.15" From 7cc90dcdee5c685e6eaf7f7f475df34f69be98db Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Thu, 17 Oct 2013 13:40:54 -0400 Subject: [PATCH 3/5] Ignore all .lock files --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f61f58b86..9fab38c64 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ .bundle .config .yardoc -Gemfile.lock +*.lock InstalledFiles _yardoc coverage From 6e8fe26cc106cc17945afe151684bd06d85df286 Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Thu, 17 Oct 2013 14:19:40 -0400 Subject: [PATCH 4/5] Require minitest instead of test/unit --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 378a96db9..d60b8bc61 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,6 +1,6 @@ require 'bundler/setup' require 'coverage_setup' -require 'test/unit' +require 'minitest/autorun' require 'active_model_serializers' require 'fixtures/poro' From d58ae2fc182e8989134ab86348d4b6525372b6fa Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Thu, 17 Oct 2013 14:21:32 -0400 Subject: [PATCH 5/5] Add minitest to rails3 Also add rails3 gemfile to travis And remote .15 from rails verison --- .travis.yml | 1 + Gemfile.rails3 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7911e7455..a044659d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ rvm: - rbx-19mode gemfile: - Gemfile + - Gemfile.rails3 - Gemfile.edge notifications: email: false diff --git a/Gemfile.rails3 b/Gemfile.rails3 index 7afd09417..7dc0bc7e8 100644 --- a/Gemfile.rails3 +++ b/Gemfile.rails3 @@ -3,8 +3,9 @@ source 'https://rubygems.org' # Specify gem dependencies in active_model_serializers.gemspec gemspec +gem 'minitest' gem 'sqlite3' gem 'coveralls', :require => false gem 'simplecov', :require => false -gem 'rails', "~> 3.2.15" +gem 'rails', "~> 3.2"