test/cases/active_support_test.rb in minitest-spec-rails-3.1.2 vs test/cases/active_support_test.rb in minitest-spec-rails-4.3.0
- old
+ new
@@ -2,19 +2,24 @@
class SomeRandomModel < ActiveRecord::Base; end
class ActiveSupportTest < MiniTestSpecRails::TestCase
+ it 'removes ActiveSupport describe method' do
+ ActiveSupport::TestCase.singleton_methods(false).map(&:to_sym).wont_include :describe
+ end
+
it 'resolves spect type for active record constants' do
assert_support MiniTest::Spec.spec_type(SomeRandomModel)
assert_support MiniTest::Spec.spec_type(User)
end
it 'wont resolve spect type for random strings' do
assert_spec MiniTest::Spec.spec_type("Unmatched String")
end
+
private
def assert_support(actual)
assert_equal ActiveSupport::TestCase, actual
end
@@ -22,22 +27,5 @@
def assert_spec(actual)
assert_equal MiniTest::Spec, actual
end
end
-
-class ActiveSupportCallbackTest < ActiveSupport::TestCase
-
- setup :foo
- setup :bar
-
- it 'works' do
- @foo.must_equal 'foo'
- @bar.must_equal 'bar'
- end
-
- private
-
- def foo ; @foo = 'foo' ; end
- def bar ; @bar = 'bar' ; end
-
-end
\ No newline at end of file