lib/rspec/rails/adapters.rb in rspec-rails-3.0.1 vs lib/rspec/rails/adapters.rb in rspec-rails-3.0.2

- old
+ new

@@ -3,11 +3,15 @@ require 'active_support/concern' module RSpec module Rails if ::Rails::VERSION::STRING >= '4.1.0' - gem 'minitest' + if defined?(Kernel.gem) + gem 'minitest' + else + require 'minitest' + end require 'minitest/assertions' # Constant aliased to either Minitest or TestUnit, depending on what is # loaded. Assertions = Minitest::Assertions else @@ -116,9 +120,13 @@ # Wraps `teardown` calls from within Rails' testing framework in # `after` hooks. def teardown(*methods) methods.each { |method| after { __send__ method } } end + end + + def initialize + @example = nil end def method_name @example end