Introduction to RSpec-Everyday Rails Summary-

Introduction

I read "** Everyday Rails-Introduction to Rails Testing with RSpec **" to learn RSpec, which is familiar to Rails programmers, so I will summarize it as my own output.

What is RSpec

It is one of the test frameworks of Ruby on Rails, and its biggest feature is that it is easy to read and write and it is possible to implement tests efficiently. Other typical test frameworks for Ruby on Rails include the Rails standard MiniTest and test-unit. In RSpec, the test code is called ** spec **.

Official Document

environment

・ Ruby 2.6.3 ・ Ruby on Rails 5.1

Constitution

The following article summarizes what I learned in "Everyday Rails-Introduction to Rails Testing with RSpec". -Test, RSpec -RSpec SetupModel Spec -Create test data with FactoryBot -Controller specSystem Spec ・ Request specifications ・ Keep specs at DRY ・ Fast writing test, fast working test ・ Other tests ・ TDD (Test Driven Development)

Recommended Posts

Introduction to RSpec-Everyday Rails Summary-
[Introduction to Rails] form_with (local: true)
[Introduction to Rails] How to use render
Introduction to Ruby 2
Introduction to SWING
[Rails 6] cocoon_ introduction
Introduction to web3j
Introduction to Micronaut 1 ~ Introduction ~
[Java] Introduction to Java
Introduction to migration
Introduction to java
Introduction to Doma
rails db: 〇〇 Summary
[Rails] Introduction of pry-rails ~ How to debug binding.pry
[Docker] Introduction to docker compose Basic summary of docker-compose.yml
Introduction to JAR files
Introduction to Ratpack (8)-Session
[Rails] devise-related routing summary
[Rails] Migration command summary
How to write Rails
Introduction to RSpec 1. Test, RSpec
Introducing Bootstrap to Rails 5
Introduction to bit operation
Introduction to Ratpack (6) --Promise
[Rails] Introduction of PAY.JP
Introducing Bootstrap to Rails !!
Introduction to Ratpack (9) --Thymeleaf
Introduction to PlayFramework 2.7 ① Overview
Introduction to Android Layout
Introduction to design patterns (introduction)
[Rails] rails db command summary
How to uninstall Rails
rails error resolution summary
Introduction to Practical Programming
Introduction to javadoc command
Introduction to jar command
Introduction to Ratpack (2)-Architecture
Introduction to lambda expression
Introduction to java command
Introduction to RSpec 2. RSpec setup
Introduction to Keycloak development
Introduction to javac command
[Introduction] Try to create a Ruby on Rails application
Method summary to update multiple columns [Ruby on Rails]
Introduction to Design Patterns (Builder)
[rails] How to post images
[Rails] Introduction of devise Basics
Introduction to RSpec 5. Controller specs
[Rails] How to use enum
Introduction to Android application development
Introduction to RSpec 3. Model specs
Introduction to Ratpack (5) --Json & Registry
[Rails] How to install devise
Introduction to Metabase ~ Environment Construction ~
[Rails] How to use enum
I was addicted to setting default_url_options with Rails devise introduction
(Dot installation) Introduction to Java8_Impression
How to read rails routes
Introduction to Design Patterns (Composite)
Introduction to Micronaut 2 ~ Unit test ~
Introduction to JUnit (study memo)