1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

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: rvm:
- 1.9.3 - 1.9.3
- 2.0.0 - 2.1.0
- rbx-19mode
- jruby-19mode - jruby-19mode
- rbx-2
- ruby-head
- jruby-head
env: env:
- "RAILS_VERSION=4.0" - "RAILS_VERSION=4.0"
@ -19,3 +21,5 @@ env:
matrix: matrix:
allow_failures: allow_failures:
- env: "RAILS_VERSION=4.1" - 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', '~> 2.12'
s.add_development_dependency 'rspec-mocks', '>= 2.12.1' s.add_development_dependency 'rspec-mocks', '>= 2.12.1'
s.add_development_dependency 'rspec-rails', '~> 2.12' 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 'capybara'
s.add_development_dependency 'active_model_serializers' s.add_development_dependency 'active_model_serializers'
end end

View file

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

View file

@ -1,18 +1,7 @@
module Draper 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' require 'active_support/test_case'
::ActiveSupport::TestCase
end
class TestCase < active_support_test_case class TestCase < ::ActiveSupport::TestCase
module ViewContextTeardown module ViewContextTeardown
def teardown def teardown
super super

View file

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