I'm a rails turotial student,
7.3.4 Test at failure
The bundle exec rake test did not succeed and the test did not proceed.
Is it because of a place that doesn't stop if it is moving normally?
If i am searching for a person who has the same symptom, you may not be able to find it.
I would appreciate any professor.Error message
Applicable source code
ERROR ["test_invalid_signup_information", UsersSignupTest, 0.425589790000231] test_invalid_signup_information # UsersSignupTest (0.43s) NameError: NameError: undefined local variable or method `user 'for #<UsersSignupTest: 0x00000000061a7998> Did you mean? Users test/integration/users_signup_test.rb: 7: in `block in<class: UsersSignupTest>' test/integration/users_signup_test.rb: 7: in `block in<class: UsersSignupTest>' FAIL ["test_email_validation_should_reject_invalid_addresses", UserTest, 0.6627793839998048] test_email_validation_should_reject_invalid_addresses # UserTest (0.66s) "user @ example, com" should be invalid test/models/user_test.rb: 34: in `block (2 levels) in<class: UserTest>' test/models/user_test.rb: 32: in `each ' test/models/user_test.rb: 32: in `block in<class: UserTest>' 16/16: [=================================] 100% Time: 00:00:00, Time : 00:00:00 Finished in 0.67250s 16 tests, 30 assertions, 1 failures, 1 errors, 0 skips
In the test/integration/users_signup_test.rb file
require 'test_helper' class UsersSignupTest
Change users to user. . . .Supplemental information (FW/tool version etc.)
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
Answer # 1
As shown in the error message, the variable
userdoes not exist here.
I would like to check the total number of users, that is,
Answer # 2
It seems that the version of the rails tutorial I have been practicing so far was old, so I was looking at the 4.2 version, and the 5.1 version was correct to proceed. After reviewing everything from Chapter 5 and proceeding, I resolved myself.
Probably the way of writing the code was wrong from around 6.2 in Chapter 6.
- ruby on rails - rails tutorial chapter 13 cooperation between heroku and aws s3 region
- ruby on rails - in the rails tutorial (4th edition, chapter 5), the layout of only the login page is broken
- ruby - rails tutorial chapter 2 (6th edition)
- ruby - rails tutorial chapter 4 test fails
- ruby - rails tutorial chapter 13 delete does not work in the test of increasing/decreasing the number of posts with rspec
- ruby - i got stuck in chapter 5 of the rails tutorial i want to apply it because applicationhtmlerb is not applied
- ruby on rails 6 - rails tutorial (6th edition, chapter 8, list 833) what is the difference between logged_in? and is_logged_in ?
- ruby on rails 6 - rails tutorial chapter 14 about follow, unfollow, following? methods
- ruby on rails - rails tutorial tests that should pass fail with an error [6th edition]
- ruby on rails 5 - the setup for everyday rails chapter 2 doesn't work (could not find shared context "project setup")
- ruby on rails - i want to write a rails tutorial test in rspec
- ruby on rails - rails tutorial about git config settings
- ruby on rails 6 - rails tutorial login [remember me] checkbox test
- windows - rails tutorial chapter 13 (1344) image upload in production environment does not work (s3, iam)
- cloud9 - rails tutorial chapter 12 problems that rails test does not pass
- ruby on rails - things associated with a foreign key cannot be called in view
- ruby on rails 6 - environment construction of ruby on rails
- ruby on rails - seed fails on heroku
- ruby on rails 5 - actioncontroller :: invalidauthenticitytoken cannot be resolved
- ruby on rails - error in controller when transitioning with rails6 destory action
- ruby - passing variables using render partial
- ruby - i want to resolve # nomethoderror i want to jump to the user details screen when i click the user name
- ruby - rails page does not open
- [ruby] i'm having trouble with nomethoderror
- ruby - [search function] acquisition of products associated with users
- ruby - even if each statement is used, the contents of the db cannot be displayed in order and an error occurs
- ruby - if i include the'omniauth-facebook'gem, do i need to install the'omniauth' gem as well?
- ruby - unable to open rails server
- i'm having trouble with ruby's word bingo algorithm
- ruby - about record duplication