Sha256: ba006b2fdc4d0ee11c5b130d78d32c182856d2b43215128baeeadf4fa0657e37

Contents?: true

Size: 743 Bytes

Versions: 9

Compression:

Stored size: 743 Bytes

Contents

require 'test_helper'

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

  def assert_spec(actual)
    assert_equal MiniTest::Spec, actual
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
minitest-spec-rails-4.3.8 test/cases/active_support_test.rb
minitest-spec-rails-4.3.7 test/cases/active_support_test.rb
minitest-spec-rails-4.3.6 test/cases/active_support_test.rb
minitest-spec-rails-4.3.5 test/cases/active_support_test.rb
minitest-spec-rails-4.3.4 test/cases/active_support_test.rb
minitest-spec-rails-4.3.3 test/cases/active_support_test.rb
minitest-spec-rails-4.3.2 test/cases/active_support_test.rb
minitest-spec-rails-4.3.1 test/cases/active_support_test.rb
minitest-spec-rails-4.3.0 test/cases/active_support_test.rb