lib/rspec/rails/adapters.rb in rspec-rails-2.13.0 vs lib/rspec/rails/adapters.rb in rspec-rails-2.13.1
- old
+ new
@@ -22,18 +22,47 @@
def assertion_instance
@assertion_instance ||= build_assertion_instance
end
assertion_modules.each do |mod|
- mod.instance_methods.each do |method|
+ mod.public_instance_methods.each do |method|
+ next if method == :method_missing || method == "method_missing"
class_eval <<-EOM, __FILE__, __LINE__ + 1
def #{method}(*args, &block)
assertion_instance.send(:#{method}, *args, &block)
end
EOM
end
end
end
+ end
+ end
+
+ # MiniTest::Unit::LifecycleHooks
+ module MiniTestLifecycleAdapter
+ extend ActiveSupport::Concern
+
+ included do |group|
+ group.before { after_setup }
+ group.after { before_teardown }
+
+ group.around do |example|
+ before_setup
+ example.run
+ after_teardown
+ end
+ end
+
+ def before_setup
+ end
+
+ def after_setup
+ end
+
+ def before_teardown
+ end
+
+ def after_teardown
end
end
module SetupAndTeardownAdapter
extend ActiveSupport::Concern