Testing ActiveRecord Concerns

ActiveRecord classes manage persistence and have a tight relationship with their database tables. This relationship, sometimes, makes testing tricky and even trickier when testing Rails concerns. This article describes how to test those concerns used in isolation from its ActiveRecord class and their associated database table.The code examples are written using RSpec. Switching to Minitest is possible but requires a fair bit of work.
Testing ActiveRecord Concerns #ruby #rubydeveloper #rubyonrails #activerecord #testing https://rubyonrails.ba/single/testing-activerecord-concerns

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles