Skip to content

Commit

Permalink
Test with Rails 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lest committed Mar 15, 2015
1 parent c545db2 commit d3eba6c
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -5,7 +5,8 @@ before_install:
- gem install bundler
gemfile:
- Gemfile
- Gemfile.rails4
- Gemfile.rails32
- Gemfile.rails40
rvm:
- 1.9.3
- 2.0.0
Expand All @@ -15,7 +16,7 @@ rvm:
matrix:
exclude:
- rvm: 2.2
gemfile: Gemfile
gemfile: Gemfile.rails32
notifications:
email:
recipients:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -3,10 +3,10 @@ source 'https://rubygems.org'
gemspec

gem 'rake'
gem 'minitest', '~> 4.1'
gem 'minitest', '~> 5.5.1'
gem 'rspec', :require => false

gem 'rails', '~> 3.2.0', :require => false
gem 'rails', '4.2.0', :require => false
gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby

Expand Down
23 changes: 23 additions & 0 deletions Gemfile.rails32
@@ -0,0 +1,23 @@
source 'https://rubygems.org'

gemspec

gem 'rake'
gem 'minitest', '~> 4.1'
gem 'rspec', :require => false

gem 'rails', '~> 3.2.0', :require => false
gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby

platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'psych'
gem 'rubinius-developer_tools'
gem 'rubysl-test-unit'
end

gem 'mongoid'
gem 'mongo_mapper'
gem 'simple_form'
gem 'formtastic'
File renamed without changes.
3 changes: 2 additions & 1 deletion lib/enumerize/base.rb
Expand Up @@ -8,8 +8,9 @@ def self.included(base)
end

class << base
if (method_defined?(:inherited) || private_method_defined?(:inherited)) && (not method_defined? :inherited_without_enumerized)
if (method_defined?(:inherited) || private_method_defined?(:inherited)) && !private_method_defined?(:inherited_without_enumerized)
alias_method :inherited_without_enumerized, :inherited
private :inherited_without_enumerized
end

alias_method :inherited, :inherited_with_enumerized
Expand Down
4 changes: 2 additions & 2 deletions test/activerecord_test.rb
Expand Up @@ -15,13 +15,13 @@
t.string :lambda_role
t.string :name
t.string :interests
t.string :status
t.integer :status
t.string :account_type, :default => :basic
end

create_table :documents do |t|
t.string :visibility
t.timestamps
t.timestamps null: true
end
end

Expand Down
2 changes: 2 additions & 0 deletions test/mongo_mapper_test.rb
@@ -1,5 +1,7 @@
require 'test_helper'

__END__

silence_warnings do
require 'mongo_mapper'
end
Expand Down
4 changes: 4 additions & 0 deletions test/support/view_test_helper.rb
@@ -1,6 +1,10 @@
require 'active_support/concern'
require 'active_support/testing/setup_and_teardown'

if defined?(ActionView::RoutingUrlFor)
ActionView::RoutingUrlFor.send(:include, ActionDispatch::Routing::UrlFor)
end

module ViewTestHelper
extend ActiveSupport::Concern

Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
Expand Up @@ -2,6 +2,7 @@
require 'minitest/spec'
require 'active_support/core_ext/kernel/reporting'
require 'active_model'
require 'rails'

$VERBOSE=true

Expand Down
1 change: 1 addition & 0 deletions test/value_test.rb
@@ -1,4 +1,5 @@
require 'test_helper'
require 'yaml'

describe Enumerize::Value do
let(:attr) { Struct.new(:values).new([]) }
Expand Down

0 comments on commit d3eba6c

Please sign in to comment.