Testing a simple guard clause in isolation
Yeah, the code/test ratio is probably a little high - especially if you have to do this for many attributes.

May I direct your attention to the #try method? Seems to me you that you might be able to skip a lot of code (and tests) by doing things like @client.try(:occupation).try(:name).

#try simply returns nil if the receiver doesn't respond to the whatever message you're sending. And since #try is also implemented on the nil object, you can chain "tries" together.

In you views, writing something like &lt;%= @client.try(:occupation).try(:name) %&gt; will just print nothing if the try-chain ends up returning nil - same as your current setup. And if you want a different fallback, you can do this:

&lt;%= @client.try(:occupation).try(:name) || "N/A" %&gt;


In other words, having an entire decorator seems a bit much just to absorb nils. But granted, the view ends up having to dig a bit further into the models.

You can of course also keep the decorator (at least so you current code doesn't break elsewhere), but simply rewrite it using #try to something like

# app/decorators/client_decorator.rb
require "simple_decorator"

class ClientDecorator &lt; SimpleDecorator
  def position
    occupation.try(:name) || ""
  end
end


which I honestly don't know if I'd bother to test very rigorously (lest it breaks horribly).