Class: ActionMailer::TestCase
Constant Summary
::ActiveSupport::Testing::Assertions - Included
::ActiveSupport::TestCase - Inherited
Behavior - Attributes & Methods
Class Attribute Summary
::ActiveSupport::TestCase - Inherited
| .file_fixture_path, .file_fixture_path?, | |
| .parallel_worker_id | Returns the current parallel worker ID if tests are running in parallel, nil otherwise. |
| .test_order | Returns the order in which test cases are run. |
| .test_order= | Sets the order in which test cases are run. |
| .parallel_worker_id= | |
Class Method Summary
::ActiveSupport::TestCase - Inherited
| .fixture_paths | Returns the |
| .fixture_paths= | Sets the given path to the fixture set. |
| .parallelize | Parallelizes the test suite. |
| .parallelize_before_fork | Before fork hook for parallel testing. |
| .parallelize_setup | Setup hook for parallel testing. |
| .parallelize_teardown | Clean up hook for parallel testing. |
::ActiveSupport::Testing::Declarative - Extended
Instance Attribute Summary
::ActiveJob::TestHelper - Included
::ActiveSupport::TestCase - Inherited
::ActiveSupport::Testing::TimeHelpers - Included
::ActiveSupport::Testing::TaggedLogging - Included
Instance Method Summary
Behavior - Included
| #assert_no_part | Assert that a |
| #assert_part | Assert that a |
| #read_fixture | Reads the fixture file for the given mailer. |
| #charset, #encode, #initialize_test_deliveries, #last_delivered_mail, #last_delivered_mail!, #restore_delivery_method, #restore_test_deliveries, #set_delivery_method, #set_expected_mail | |
TestHelper - Included
| #assert_emails | Asserts that the number of emails sent matches the given number. |
| #assert_enqueued_email_with | Asserts that a specific email has been enqueued, optionally matching arguments and/or params. |
| #assert_enqueued_emails | Asserts that the number of emails enqueued for later delivery matches the given number. |
| #assert_no_emails | Asserts that no emails have been sent. |
| #assert_no_enqueued_emails | Asserts that no emails are enqueued for later delivery. |
| #capture_emails | Returns any emails that are sent in the block. |
| #deliver_enqueued_emails | Delivers all enqueued emails. |
| #delivery_job_filter | |
::ActiveJob::TestHelper - Included
| #assert_enqueued_jobs | Asserts that the number of enqueued jobs matches the given number. |
| #assert_enqueued_with | Asserts that the job has been enqueued with the given arguments. |
| #assert_no_enqueued_jobs | Asserts that no jobs have been enqueued. |
| #assert_no_performed_jobs | Asserts that no jobs have been performed. |
| #assert_performed_jobs | Asserts that the number of performed jobs matches the given number. |
| #assert_performed_with | Asserts that the job has been performed with the given arguments. |
| #perform_enqueued_jobs | Performs all enqueued jobs. |
| #queue_adapter | Accesses the queue_adapter set by |
| #queue_adapter_for_test | Returns a queue adapter instance to use with all Active Job test helpers. |
| #clear_enqueued_jobs, #clear_performed_jobs, #deserialize_args_for_assertion, #enqueued_jobs_with, #filter_as_proc, #flush_enqueued_jobs, #instantiate_job, #jobs_with, #performed_jobs_with, #prepare_args_for_assertion, #queue_adapter_changed_jobs, #require_active_job_test_adapter!, #validate_option, #after_teardown, #before_setup | |
::ActiveSupport::TestCase - Inherited
| #assert_no_match | Alias for: refute_match |
| #assert_not_empty | Alias for: refute_empty |
| #assert_not_equal | Alias for: refute_equal |
| #assert_not_in_delta | Alias for: refute_in_delta |
| #assert_not_in_epsilon | Alias for: refute_in_epsilon |
| #assert_not_includes | Alias for: refute_includes |
| #assert_not_instance_of | Alias for: refute_instance_of |
| #assert_not_kind_of | Alias for: refute_kind_of |
| #assert_not_nil | Alias for: refute_nil |
| #assert_not_operator | Alias for: refute_operator |
| #assert_not_predicate | Alias for: refute_predicate |
| #assert_not_respond_to | Alias for: refute_respond_to |
| #assert_not_same | Alias for: refute_same |
| #method_name, | |
| #parallel_worker_id | Returns the current parallel worker ID if tests are running in parallel. |
| #inspect | |
::ActiveSupport::Testing::FileFixtures - Included
| #file_fixture | Returns a |
::ActiveSupport::Testing::TimeHelpers - Included
| #after_teardown, | |
| #freeze_time | Calls |
| #travel | Changes current time to the time in the future or in the past by a given time difference by stubbing |
| #travel_back | Returns the current time back to its original state, by removing the stubs added by |
| #travel_to | Changes current time to the given time by stubbing |
| #unfreeze_time | |
| #simple_stubs | |
::ActiveSupport::Testing::ConstantStubbing - Included
| #stub_const | Changes the value of a constant for the duration of a block. |
::ActiveSupport::Testing::Deprecation - Included
| #assert_deprecated | Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. |
| #assert_not_deprecated | Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. |
| #collect_deprecations | Returns the return value of the block and an array of all the deprecation warnings emitted by the given deprecator during the execution of the yielded block. |
::ActiveSupport::Testing::NotificationAssertions - Included
| #assert_no_notifications | Assert no notifications were emitted for a given |
| #assert_notification | Assert a notification was emitted with a given |
| #assert_notifications_count | Assert the number of notifications emitted with a given |
| #capture_notifications | Capture emitted notifications, optionally filtered by a |
::ActiveSupport::Testing::EventReporterAssertions - Included
| #assert_event_reported | Asserts that the block causes an event with the given name to be reported to Rails.event. |
| #assert_events_reported | Asserts that the provided events were reported, regardless of order. |
| #assert_no_event_reported | Asserts that the block does not cause an event to be reported to Rails.event. |
| #with_debug_event_reporting | Allows debug events to be reported to Rails.event for the duration of a given block. |
::ActiveSupport::Testing::ErrorReporterAssertions - Included
| #assert_error_reported | Assertion that the block should cause at least one exception to be reported to Rails.error. |
| #assert_no_error_reported | Assertion that the block should not cause an exception to be reported to Rails.error. |
| #capture_error_reports | Captures reported errors from within the block that match the given error class. |
::ActiveSupport::Testing::Assertions - Included
| #assert_changes | Assertion that the result of evaluating an expression is changed before and after invoking the passed in block. |
| #assert_difference | Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block. |
| #assert_no_changes | Assertion that the result of evaluating an expression is not changed before and after invoking the passed in block. |
| #assert_no_difference | Assertion that the numeric result of evaluating an expression is not changed before and after invoking the passed in block. |
| #assert_not | Asserts that an expression is not truthy. |
| #assert_nothing_raised | Assertion that the block should not raise an exception. |
| #assert_raise | |
| #assert_raises | Asserts that a block raises one of |
| #_assert_nothing_raised_or_warn, #_callable_to_source_string | |
::ActiveSupport::Testing::TestsWithoutAssertions - Included
::ActiveSupport::Testing::SetupAndTeardown - Included
::ActiveSupport::Testing::TaggedLogging - Included
Class Attribute Details
._decoders (rw)
[ GitHub ]
._decoders? ⇒ Boolean (rw)
[ GitHub ]
._mailer_class (rw)
[ GitHub ]# File 'actionmailer/lib/action_mailer/test_case.rb', line 44
class_attribute :_mailer_class
._mailer_class? ⇒ Boolean (rw)
[ GitHub ]
# File 'actionmailer/lib/action_mailer/test_case.rb', line 44
class_attribute :_mailer_class
Instance Attribute Details
#_decoders (rw)
[ GitHub ]
#_decoders? ⇒ Boolean (rw)
[ GitHub ]
#_mailer_class (rw)
[ GitHub ]# File 'actionmailer/lib/action_mailer/test_case.rb', line 44
class_attribute :_mailer_class
#_mailer_class? ⇒ Boolean (rw)
[ GitHub ]
# File 'actionmailer/lib/action_mailer/test_case.rb', line 44
class_attribute :_mailer_class