diff --git a/.travis.yml b/.travis.yml index fe056e4..fe96c34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,44 @@ rvm: - 2.3 - 2.2 - 2.1 - - 1.9.3 - - jruby-19mode + - jruby - rbx-2 gemfile: - - gemfiles/active_model_4.1.gemfile - gemfiles/active_model_4.2.gemfile + - gemfiles/active_model_5.0.gemfile + - gemfiles/active_model_5.1.gemfile + - gemfiles/active_model_5.2.gemfile + - gemfiles/active_model_6.0.gemfile + - gemfiles/active_model_edge.gemfile matrix: + exclude: + - gemfile: gemfiles/active_model_5.0.gemfile + rvm: '2.1' + - gemfile: gemfiles/active_model_5.1.gemfile + rvm: '2.1' + - gemfile: gemfiles/active_model_5.2.gemfile + rvm: '2.1' + - gemfile: gemfiles/active_model_6.0.gemfile + rvm: '2.1' + - gemfile: gemfiles/active_model_6.0.gemfile + rvm: '2.2' + - gemfile: gemfiles/active_model_6.0.gemfile + rvm: '2.3' + - gemfile: gemfiles/active_model_6.0.gemfile + rvm: '2.4' + - gemfile: gemfiles/active_model_edge.gemfile + rvm: '2.1' + - gemfile: gemfiles/active_model_edge.gemfile + rvm: '2.2' + - gemfile: gemfiles/active_model_edge.gemfile + rvm: '2.3' + - gemfile: gemfiles/active_model_edge.gemfile + rvm: '2.4' allow_failures: - - rvm: ruby-head + - rvm: rbx-2 + - gemfile: gemfiles/active_model_edge.gemfile + rvm: '2.5' + - gemfile: gemfiles/active_model_edge.gemfile + rvm: '2.6' diff --git a/gemfiles/active_model_4.1.gemfile b/gemfiles/active_model_5.0.gemfile similarity index 60% rename from gemfiles/active_model_4.1.gemfile rename to gemfiles/active_model_5.0.gemfile index 7ff5da7..3d1bfb3 100644 --- a/gemfiles/active_model_4.1.gemfile +++ b/gemfiles/active_model_5.0.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "activemodel", :github => "rails/rails", :branch => "4-1-stable" +gem "activemodel", :github => "rails/rails", :branch => "5-0-stable" gemspec :path => "../" diff --git a/gemfiles/active_model_5.1.gemfile b/gemfiles/active_model_5.1.gemfile new file mode 100644 index 0000000..fd33165 --- /dev/null +++ b/gemfiles/active_model_5.1.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activemodel", :github => "rails/rails", :branch => "5-1-stable" + +gemspec :path => "../" diff --git a/gemfiles/active_model_5.2.gemfile b/gemfiles/active_model_5.2.gemfile new file mode 100644 index 0000000..08c2703 --- /dev/null +++ b/gemfiles/active_model_5.2.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activemodel", :github => "rails/rails", :branch => "5-2-stable" + +gemspec :path => "../" diff --git a/gemfiles/active_model_6.0.gemfile b/gemfiles/active_model_6.0.gemfile new file mode 100644 index 0000000..cdb102f --- /dev/null +++ b/gemfiles/active_model_6.0.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activemodel", :github => "rails/rails", :branch => "6-0-stable" + +gemspec :path => "../" diff --git a/gemfiles/active_model_edge.gemfile b/gemfiles/active_model_edge.gemfile new file mode 100644 index 0000000..1ad4058 --- /dev/null +++ b/gemfiles/active_model_edge.gemfile @@ -0,0 +1,11 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activemodel", :github => "rails/rails", :branch => "master" + +platforms :mri_20, :mri_21 do + gem "pry-byebug" +end + +gemspec :path => "../" diff --git a/test/test_helper.rb b/test/test_helper.rb index fdade7e..98778c0 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -11,6 +11,7 @@ module MongoidTest end +I18n.load_path << StateMachines::Integrations::Mongoid.locale_path class BaseTestCase < Minitest::Test def default_test @@ -18,7 +19,7 @@ def default_test def teardown if @table_names - client = Mongo::Client.new(['127.0.0.1:27017']) + client = Mongoid::Clients.with_name(:default) db = Mongo::Database.new(client, :test) db.collections.each {|c| c.drop if @table_names.include?(c.name)} end