RSpec: The Most Accurate Service Test Type

What is the most accurate type of test for testing the normal ruby ​​class (PORO) with rspec - in my case it is a service. Normally I would use the test :model .

But just for the sake of idiomatic testing: is there a way to have an rspec test that is thinner than type :model ?

+4
source share
1 answer

There is a type not applicable . Just treat it like PORO and write a specification. If you really wanted to add a type, you can add type: :service , but by default it will do nothing.

 RSpec.describe MyServiceObject do # specs end 
+7
source

All Articles