lib/minitest-spec-rails/dsl.rb in minitest-spec-rails-4.7.2 vs lib/minitest-spec-rails/dsl.rb in minitest-spec-rails-4.7.3
- old
+ new
@@ -3,19 +3,24 @@
RAILS_TEST_CASES = []
def self.included(klass)
klass.extend ClassMethods
+ remove_method :test if method_defined?(:test)
end
module ClassMethods
def before(type = nil, &block)
setup { self.instance_eval(&block) }
end
def after(type = nil, &block)
teardown { self.instance_eval(&block) }
+ end
+
+ def test(name, &block)
+ it { self.instance_eval(&block) }
end
def rails_test_cases
RAILS_TEST_CASES
end
\ No newline at end of file