Merge branch 'master' of github.com:drapergem/draper

This commit is contained in:
Michael Schuerig 2014-06-01 08:59:20 +02:00
commit e8f388524b
5 changed files with 15 additions and 18 deletions

View File

@ -5,9 +5,11 @@ services:
rvm:
- 1.9.3
- 2.0.0
- rbx-19mode
- 2.1.0
- jruby-19mode
- rbx-2
- ruby-head
- jruby-head
env:
- "RAILS_VERSION=4.0"
@ -19,3 +21,5 @@ env:
matrix:
allow_failures:
- env: "RAILS_VERSION=4.1"
- rvm: ruby-head
- rvm: jruby-head

View File

@ -27,7 +27,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec', '~> 2.12'
s.add_development_dependency 'rspec-mocks', '>= 2.12.1'
s.add_development_dependency 'rspec-rails', '~> 2.12'
s.add_development_dependency 'minitest-rails', '~> 0.2'
s.add_development_dependency 'minitest-rails', '>= 1.0'
s.add_development_dependency 'capybara'
s.add_development_dependency 'active_model_serializers'
end

View File

@ -20,7 +20,6 @@ module Draper
if Rails.env.test?
require 'draper/test_case'
require 'draper/test/rspec_integration' if defined?(RSpec) and RSpec.respond_to?(:configure)
require 'draper/test/minitest_integration' if defined?(MiniTest::Rails)
end
end
@ -50,6 +49,12 @@ module Draper
end
end
initializer "draper.minitest-rails_integration" do |app|
ActiveSupport.on_load :minitest do
require "draper/test/minitest_integration"
end
end
console do
require 'action_controller/test_case'
ApplicationController.new.view_context

View File

@ -1,18 +1,7 @@
module Draper
begin
require 'minitest/rails'
rescue LoadError
end
require 'active_support/test_case'
active_support_test_case = begin
require 'minitest/rails/active_support' # minitest-rails < 0.5
::MiniTest::Rails::ActiveSupport::TestCase
rescue LoadError
require 'active_support/test_case'
::ActiveSupport::TestCase
end
class TestCase < active_support_test_case
class TestCase < ::ActiveSupport::TestCase
module ViewContextTeardown
def teardown
super

View File

@ -73,7 +73,6 @@ test:
hosts:
- localhost:27017
options:
consistency: :strong
# In the test environment we lower the retries and retry interval to
# low amounts for fast failures.
max_retries: 1