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

- old
+ new

@@ -87,17 +87,14 @@ end end # @private module MinitestCounters + attr_writer :assertions def assertions @assertions ||= 0 end - - def assertions=(assertions) - @assertions = assertions - end end # @private module SetupAndTeardownAdapter extend ActiveSupport::Concern @@ -122,11 +119,12 @@ def teardown(*methods) methods.each { |method| after { __send__ method } } end end - def initialize + def initialize(*args) + super @example = nil end def method_name @example @@ -141,11 +139,15 @@ module ClassMethods # Returns the names of assertion methods that we want to expose to # examples without exposing non-assertion methods in Test::Unit or # Minitest. def assertion_method_names - ::RSpec::Rails::Assertions.public_instance_methods.select{|m| m.to_s =~ /^(assert|flunk|refute)/} + - [:build_message] + methods = ::RSpec::Rails::Assertions. + public_instance_methods. + select do |m| + m.to_s =~ /^(assert|flunk|refute)/ + end + methods + [:build_message] end def define_assertion_delegators assertion_method_names.each do |m| define_method(m.to_sym) do |*args, &block|