K-Sato' Blog
About me

Rspec resources

0Hits
    Posted on: August 26, 2019Written by: K-Sato
    ⚠️ This article was posted over 2 years ago. The information might be outdated. ⚠️

    Table of Contents

    • Test private methods
    • Stub ENV variables
    • Test API calls
    • Mocks Stubs
    • Test Application_controller
    • Stub request headers
    • Test modules
    • Test application_record

    Test private methods

    • 3 ways of testing private methods in Rails - Mix & Go

    Stub ENV variables

    • ruby - What is the best way to write specs for code that depends on environment variables? - Stack Overflow
    • Testing and Environment Variables

    Test API calls

    • Rails API Testing Best Practices

    Mocks Stubs

    • Rspec Basics ② (Hooks, Subject, Mocks, Stubs) | K-Sato

    Test Application_controller

    • How do I test an application_controller on a rails app - Blog do Time
    • anonymous controller - Controller specs - RSpec Rails - RSpec - Relish

    Stub request headers

    • Rails 5 / Rspec 3.5.0 — setting request headers? · Issue #1655 · rspec/rspec-rails · GitHub

    Test modules

    • How to Test Ruby Modules With Rspec - Mix & Go
    • Testing modules in rspec - Stack Overflow

    Test application_record

    • How can I test methods in the ApplicationRecord abstract base class?

    About the author

    I am a web-developer based somewhere on earth. I primarily code in TypeScript, Go and Ruby at work. React, RoR and Gin are my go-to Frameworks.

    K-Sato's Blog
    Icons made byKiranshastryfromwww.flaticon.com