[RUBY] What I was addicted to while using rspec on rails

Keep in mind that beginners were addicted to writing tests using rspec in rails.

When I tried to test the controller with rspec, I got a lot of errors. No matter where I fixed it, it didn't work, so I decided to write it according to the reference site and investigate what was wrong. But that still doesn't work. .. .. After reviewing the settings, the controller test was deprecated from rails5 and had to be changed as follows.

model → model (as is) controller     → request Screen transition test → system

It was necessary to create a folder like this, and it was necessary to describe the rails_helper settings according to the above. Please note that the reference article is a mixture of controller and request.

Also, recent rails have deprecated controller testing, It seems that it was enough if the tests of create, destroy, edit, and update were described.

Recommended Posts

What I was addicted to while using rspec on rails
I was addicted to using RXTX on Sierra
What I was addicted to when implementing google authentication with rails
I was addicted to installing Ruby/Tk on MacOS
[Rails] I was addicted to the nginx settings when using Action Cable.
I was addicted to starting sbt
What I was addicted to when introducing the JNI library
What I fixed when updating to Spring Boot 1.5.12 ・ What I was addicted to
I was addicted to setting default_url_options with Rails devise introduction
I was addicted to looping the Update statement on MyBatis
A story I was addicted to in Rails validation settings
What I was addicted to with the Redmine REST API
I was addicted to using Java's Stream API in Scala
What I was addicted to when trying to properly openAPI/Swagger documentation with Rails + Grape + Grape Swagger
A story I was addicted to before building a Ruby and Rails environment using Ubuntu (20.04.1 LTS)
A note when I was addicted to converting Ubuntu on WSL1 to WSL2
Use npm while using Sprockets on Rails 5
I was addicted to rewriting to @SpringApplicationConfiguration-> @SpringBootTest
I was addicted to the roll method
I was addicted to the Spring-Batch test
Memorandum: What I was addicted to when I hit the accounting freee API
A story I was addicted to when testing the API using MockMVC
I was a little addicted to running old Ruby environment and old Rails
[CircleCI] I was addicted to the automatic test of CircleCI (rails + mysql) [Memo]
I was addicted to doing onActivityResult () with DialogFragment
I was addicted to the NoSuchMethodError in Cloud Endpoints
I was addicted to the record of the associated model
What I was addicted to when developing a Spring Boot application with VS Code
A story I was addicted to when getting a key that was automatically tried on MyBatis
I want to implement it additionally while using kotlin on a site running Java
I tried unit testing Rails app using RSpec and FactoryBot
What I was interested in in Progate's Ruby on Rails course [Each statement of error message]
I knew what reflection was
[Ruby on Rails] I get a warning when executing RSpec due to a different gem version.
I entered from Rails and didn't know what [attr_accessor] was
I tried using Hotwire to make Rails 6.1 scaffold a SPA
[Rails] Test code using Rspec
[Rails] I want to display "XX minutes ago" using created_at!
I was addicted to the setting of laradock + VSCode + xdebug
Beginner Ruby on Rails What I learned is being summarized
[Rails] I tried to implement "Like function" using rails and js
The story I was addicted to when setting up STS
What I was addicted to when updating the PHP version of the development environment (Docker) from 7.2.11 to 7.4.x
[Rails] How to solve ActiveSupport :: MessageVerifier :: InvalidSignature that I was addicted to when introducing twitter login [ActiveStorage]
[Circle CI] A story I was addicted to at Start Building
Where I was interested in Progate's Ruby on Rails course [params]
I tried to summarize what was asked at the site-java edition-
I want to add a browsing function with ruby on rails
I just want to write Java using Eclipse on my Mac
[RSpec on Rails] How to write test code for beginners by beginners
I tried to build a simple application using Dockder + Rails Scaffold
About the matter that I was addicted to how to use hashmap
I tried to display the calendar on the Eclipse console using Java.
I was addicted to the API version min23 setting of registerTorchCallback
What I learned from studying Rails
How to use Ruby on Rails
How to deploy Bootstrap on Rails
[Ruby on Rails] What is Bcrypt?
Rails on Tiles (how to write)
Android memo-I was addicted to Permission
Deploy Rails on Docker to heroku