diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-07-21 17:58:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-21 17:58:30 -0400 |
commit | af08044d6a6aa87d3b389f63c78564be2f60b1ab (patch) | |
tree | 6f50e28124940debd9e6a455044c2637926d6cc4 /activejob/lib | |
parent | 8ec5c878fdb0eb326c56deea4405364a98d279b5 (diff) | |
parent | 292be1b7de488fb8c81d65cc68525d1d78f53c67 (diff) | |
download | rails-af08044d6a6aa87d3b389f63c78564be2f60b1ab.tar.gz rails-af08044d6a6aa87d3b389f63c78564be2f60b1ab.tar.bz2 rails-af08044d6a6aa87d3b389f63c78564be2f60b1ab.zip |
Merge pull request #29858 from y-yagi/use_argument_error_instead_of_own_error_class
Use `ArgumentError` instead of own error class
Diffstat (limited to 'activejob/lib')
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index 2ffedf2999..1cd2c40c15 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -6,7 +6,6 @@ require "active_support/core_ext/hash/keys" module ActiveJob # Provides helper methods for testing Active Job module TestHelper - class InvalidOptionsError < StandardError; end delegate :enqueued_jobs, :enqueued_jobs=, :performed_jobs, :performed_jobs=, to: :queue_adapter @@ -443,7 +442,7 @@ module ActiveJob end def validate_option(only: nil, except: nil) - raise InvalidOptionsError, "Cannot specify both `:only` and `:except` options." if only && except + raise ArgumentError, "Cannot specify both `:only` and `:except` options." if only && except end end end |