Hello all,
In a bit of a conundrum here. I have a custom form builder I am trying
to
test and can’t seem to get it to work. I found this http://www.pathf.com/blogs/2007/12/rspec-and-rails/ which helps in that
it
points me to the HelperExampleGroup to get the @template methods I am
going
to need. The problem is that we have our form builders in their own
folder
(app/form_builders) and hence their own spec folder
(spec/form_builders).
How can I get the specs in that folder (spec/form_builders) to behave
like
they were helper tests so that I have access to the @template object?
Things have changed a bit since Dec 07. The helper module is no longer
included directly in the example group, but are exposed through a
helper object instead.
which helps in that it
points me to the HelperExampleGroup to get the @template methods I am going
to need. The problem is that we have our form builders in their own folder
(app/form_builders) and hence their own spec folder (spec/form_builders).
How can I get the specs in that folder (spec/form_builders) to behave like
they were helper tests so that I have access to the @template object?
Thanks
Peer
end
No assertion in there, but it doesn’t matter because I get this error:
private method `select’ called for
#ActiveSupport::TestCase::Subclass_1::Subclass_1:0x72b229c
I haven’t had any success getting around this one, without stubbing beyond
recognition. Any ideas?
This is what I was saying before - that you can’t use self anymore
because the helper module is not included in the current context.
Instead, use the helper object: