You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ydakuka@yauhenid:~/Work/main_app$ bin/rails_docker rspec spec/models/user_spec.rbAn error occurred while loading ./spec/models/user_spec.rb.Failure/Error: describe `validations` do it { is_expected.to allow_values('', nil).for :username } endErrno::ENOENT: No such file or directory - validations
# ./spec/models/user_spec.rb:11:in ``'
# ./spec/models/user_spec.rb:11:in `block in<top (required)>'
# ./spec/models/user_spec.rb:5:in `<top (required)>'
2 case
RSpec.describeUserdosubject(:user){record}let(:record){create(:user)}describe`.custom_search`dosubject(:result){described_class.custom_search(query)}let(:query){nil}let!(:user){create(:user,email: email,username: username)}let(:email){Faker::Internet.email}let(:username){Faker::Internet.unique.username(specifier: 5..30,separators: [])}context'when query is blank'dolet(:query){' '}specifydoexpect(result.to_set).toeqSet.new[user]endendendend
I run tests and get the error again.
ydakuka@yauhenid:~/Work/main_app$ bin/rails_docker rspec spec/models/user_spec.rbAn error occurred while loading ./spec/models/user_spec.rb.Failure/Error: describe `.custom_search` do subject(:result) { described_class.custom_search(query) } let(:query) { nil } let!(:user) { create(:user, email: email, username: username) }Errno::ENOENT: No such file or directory - .custom_search
# ./spec/models/user_spec.rb:10:in ``'
# ./spec/models/user_spec.rb:10:in `block in<top (required)>'
# ./spec/models/user_spec.rb:5:in `<top (required)>'
3 case
And the last case, I have the following code:
RSpec.describeUserdosubject(:user){record}let(:record){create(:user)}describe`#confirmation_period`dosubject(:result){user.confirmation_period}let:userdocreate(:user,confirmation_token: confirmation_token,confirmation_sent_at: confirmation_sent_at)endlet(:confirmation_token){Devise.friendly_token}let(:confirmation_sent_at){Time.zone.yesterday}context'when confirmation_sent_at is nil'dolet(:confirmation_sent_at){nil}specifydoexpect(result).tobe_within(3).of(Time.now.utc)endendendend
I run tests and get the output:
ydakuka@yauhenid:~/Work/main_app$ bin/rails_docker rspec spec/models/user_spec.rbRandomized with seed 52396User when confirmation_sent_at is nil is expected to be within 3 of 2024-02-16 13:31:06.595864359 +0000Finished in 0.51541 seconds (files took 3.68 seconds to load)1 example, 0 failures
I expected to see the following output
User #confirmation_period when confirmation_sent_at is nil is expected to be within 3 of 2024-02-16 13:32:56.238174256 +0000
, but the next sentence (#confirmation_period) had disappeared.
The text was updated successfully, but these errors were encountered:
1 case
I have the following spec:
I run tests and I get:
2 case
I run tests and get the error again.
3 case
And the last case, I have the following code:
I run tests and get the output:
I expected to see the following output
, but the next sentence (
#confirmation_period
) had disappeared.The text was updated successfully, but these errors were encountered: