[RUBY] Introduction to RSpec 1. Test, RSpec

This is the first introduction to RSpec. Series Overview

Why automate testing

First and foremost, once you write a test, you don't have to check the operation every time you rewrite the program, and you can reduce the risk of missing checks **. It takes a certain amount of man-hours to write a complete test, but reducing the total work time including bug fixing will be a considerable merit. Another thing is that you can ** guarantee the operation of the program ** by enhancing the automatic test. Just saying "I've verified it works!" Is not a guarantee, but the fact that the test was run and passed ensures that it works at least within the scope of the test.

Benefits of RSpec

・ ** Easy to read and write ** ・ ** You can write code efficiently if you master the library **

Be aware of the test

  1. Reliable
  2. Easy to write
  3. Easy to understand at any time

Continued

Recommended Posts

Introduction to RSpec 1. Test, RSpec
Introduction to RSpec 2. RSpec setup
Introduction to RSpec 5. Controller specs
Introduction to RSpec 6. System specifications
Introduction to RSpec 3. Model specs
Introduction to Micronaut 2 ~ Unit test ~
Introduction to RSpec 4. Create test data with Factory Bot
[RSpec] How to write test code
Introduction to Ruby 2
Rspec introduction memo_Rails
Introduction to SWING
Introduction to web3j
Introduction to Micronaut 1 ~ Introduction ~
[Java] Introduction to Java
Introduction to migration
Introduction to java
Introduction to Doma
How to write an RSpec controller test
I want to test Action Cable with RSpec test
Introduction to JAR files
RSpec test code execution
Introduction to bit operation
Introduction to Ratpack (6) --Promise
Set RSpec to DRY
Introduction to Ratpack (9) --Thymeleaf
How to use "sign_in" in integration test (RSpec)
Introduction to PlayFramework 2.7 ① Overview
Introduction to Android Layout
Introduction to design patterns (introduction)
Introduction to Practical Programming
Introduction to javadoc command
[Rails] Test with RSpec
Introduction to jar command
Test Nokogiri with Rspec.
Introduction to Ratpack (2)-Architecture
Introduction to lambda expression
Introduction to java command
Introduction to Keycloak development
Introduction to javac command
[Rails] I want to test with RSpec. We support your step [Introduction procedure]
[Rails] From test preparation to model unit testing [RSpec]
[RSpec] How to test error messages set by Shoulda-Matchers
Introduction to Android application development
Introduction to Ratpack (5) --Json & Registry
Introduction to Metabase ~ Environment Construction ~
Introduction to Ratpack (7) --Guice & Spring
(Dot installation) Introduction to Java8_Impression
Introduction to Design Patterns (Composite)
Test Active Strage with RSpec
Introduction to JUnit (study memo)
Introduction to Spring Boot ① ~ DI ~
Introduction to design patterns (Flyweight)
[Java] Introduction to lambda expressions
Introduction to Spring Boot ② ~ AOP ~
Introduction to Apache Beam (2) ~ ParDo ~
[Ruby] Introduction to Ruby Error statement
[Rails] Test code using Rspec
Introduction to EHRbase 2-REST API
Test GraphQL resolver with rspec
Introduction to design patterns Prototype
GitHub Actions Introduction to self-made actions