Theo Blog

"You have to do the best with what God gave you." - Mrs. Gump

Unit test and test double

Ruby on Rails with Rspec

Fail first, I am not afraid of failing. I am saying this in my real life. For example: Before starting to say anything about testing, I can’t forget to say about Uncle bob because I have lea...

TDD GraphQL on Rails

Ruby on Rails with Rspec

Let’s do TDD with GraphQL + Rails + Rspec Introduction It has been a long time working with Rails + GraphQL technologies. so, I want to recap the Rails + GraphQL and summarize a few points...

Why You Need Service Objects

Ruby on Rails service objects

Why You Need Service Objects? The problems As your application grows you will see domain/business logic scattered across models, controllers and GraphQL resolvers. many logics don’t belong to...

Feature flags in Ruby on Rails

Feat. Flipper

“Feature flags” What are feature flags? Feature flags are a way to enable or disable a feature while the application is running. When the flag is enabled, the function is used. Otherwise, i...

How to test ActiveJob is enqueued in a controller?

Rails ActiveJob

“Yeah It’s pretty straightforward.” How to test ActiveJob is enqueued in a controller? I created an ActiveJob and now we want to call the job in our controller. I want to test if the job ...

How does class methods on Rails Action Mailers work

Rails Magic

“Yeah It’s magic.” When I worked with an Action Mailer, I realized that I called a class method of the Action mailer without defining any class method at the Action mailer. It made me so confu...