Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix internationalization errors on tests #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
Expand Up @@ -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 => "../"
7 changes: 7 additions & 0 deletions gemfiles/active_model_5.1.gemfile
Original file line number Diff line number Diff line change
@@ -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 => "../"
7 changes: 7 additions & 0 deletions gemfiles/active_model_5.2.gemfile
Original file line number Diff line number Diff line change
@@ -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 => "../"
7 changes: 7 additions & 0 deletions gemfiles/active_model_6.0.gemfile
Original file line number Diff line number Diff line change
@@ -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 => "../"
11 changes: 11 additions & 0 deletions gemfiles/active_model_edge.gemfile
Original file line number Diff line number Diff line change
@@ -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 => "../"
3 changes: 2 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
module MongoidTest
end

I18n.load_path << StateMachines::Integrations::Mongoid.locale_path

class BaseTestCase < Minitest::Test
def default_test
end

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
Expand Down