Rspec has a pretty handy feature called predicate matchers to test predicate methods on your classes.
Assume we have a method registered? on our User class:
And we have a usual spec:
RSpec provides predicate matchers
which are dynamic matchers for your predicate methods (ones ending with a ?).
Using this combined with the one-line matchers,
we can convert our specs to more readable ones: