I didn't feel very satisfied about using the type: :view
solution that I discovered earlier in this thread, despite it's a very valid one. The thing is that my spec for a file inside lib/
directory shouldn't be actually considered as a view spec.
So I did some further research over the internet and found out one that seems a better approach to me.
So considering the original example in this thread. You should just add the following line inside your describe block:
include Webrat::Matchers
So the final example would look like:
describe MyApp::UI::MyDecoratorClass do
include Webrat::Matchers
# ...
end