At a bit of a confused here, I am running rspec test on my rails app and have a model spec:
it { should validate_uniqueness_of(:email).case_insensitive }
which is 1 of3 tests for the email object and it keeps failing with the following error:
1) User should validate that :email is case-insensitively unique
Failure/Error: it { should validate_uniqueness_of(:email).case_insensitive }
ArgumentError:
SMTP To address may not be blank: []
# ./spec/models/user_spec.rb:43:in `block (2 levels) in <top (required)>'
I cant understand why testing that email address in a model would require any SMTP TO address.
Not sure what to look at any help would be great as its my only failing test :(
Only other stuff I would think might help is I running:
- ruby v2.5.0p0
- rails v5.1.6
- RSpec 3.7
- rspec-core 3.7.1
- rspec-expectations 3.7.0
- rspec-mocks 3.7.0
- rspec-rails 3.7.2
- rspec-support 3.7.1
to:
option – kangkyu