File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,30 +29,24 @@ def test_verification_result
2929 assert_equal 'undeliverable' , invalid_user . email_verification_result . state
3030 end
3131
32- def test_boolean_options
32+ def test_boolean_options_with_invalid_value
3333 %i[ smtp free role disposable accept_all ] . each do |option |
3434 invalid_options = user_class ( option => 'string' ) . new
35- valid_options = user_class . new
3635
37- refute valid_options . valid?
3836 assert_raises ( ArgumentError ) { invalid_options . valid? }
3937 end
4038 end
4139
42- def test_states_option
40+ def test_states_option_with_invalid_value
4341 invalid_options = user_class ( states : %i[ invalid_state ] ) . new
44- valid_options = user_class . new
4542
46- refute valid_options . valid?
4743 assert_raises ( ArgumentError ) { invalid_options . valid? }
4844 end
4945
50- def test_timeout_option
46+ def test_timeout_option_with_invalid_value
5147 invalid_options1 = user_class ( timeout : 'string' ) . new
5248 invalid_options2 = user_class ( timeout : 1 ) . new
53- valid_options = user_class . new
5449
55- refute valid_options . valid?
5650 assert_raises ( ArgumentError ) { invalid_options1 . valid? }
5751 assert_raises ( ArgumentError ) { invalid_options2 . valid? }
5852 end
You can’t perform that action at this time.
0 commit comments