Sha256: 46831dee850ed055bb36050ad985d822c36f4282637a8bbd38e820d82812e0bd
Contents?: true
Size: 1.34 KB
Versions: 22
Compression:
Stored size: 1.34 KB
Contents
require 'test_helper' class NotificationMailer < ActionMailer::Base; end class Notifications < ActionMailer::Base; end class ActionMailerTest < MiniTestSpecRails::TestCase it 'matches spec type for class constants' do assert_mailer MiniTest::Spec.spec_type(NotificationMailer) assert_mailer MiniTest::Spec.spec_type(Notifications) end it 'matches spec type for strings' do assert_mailer MiniTest::Spec.spec_type("WidgetMailer") assert_mailer MiniTest::Spec.spec_type("WidgetMailerTest") assert_mailer MiniTest::Spec.spec_type("Widget Mailer Test") # And is case sensitive refute_mailer MiniTest::Spec.spec_type("widgetmailer") refute_mailer MiniTest::Spec.spec_type("widgetmailertest") refute_mailer MiniTest::Spec.spec_type("widget mailer test") end it 'wont match spec type for non space characters' do refute_mailer MiniTest::Spec.spec_type("Widget Mailer\tTest") refute_mailer MiniTest::Spec.spec_type("Widget Mailer\rTest") refute_mailer MiniTest::Spec.spec_type("Widget Mailer\nTest") refute_mailer MiniTest::Spec.spec_type("Widget Mailer\fTest") refute_mailer MiniTest::Spec.spec_type("Widget MailerXTest") end private def assert_mailer(actual) assert_equal ActionMailer::TestCase, actual end def refute_mailer(actual) refute_equal ActionMailer::TestCase, actual end end
Version data entries
22 entries across 22 versions & 2 rubygems