Merge branch 'master' of github.com:drapergem/draper
This commit is contained in:
commit
e8f388524b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,18 +1,7 @@
|
|||
module Draper
|
||||
begin
|
||||
require 'minitest/rails'
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue