Displaying 1 result from an estimated 1 matches for "some_helper_method".
2007 Mar 09
6
AssertSelect for strings?
Hi,
Is there a way to use the have_tag matcher on a string instead of the
response body from a view? I have a helper in a method rails project
that returns an html fragment which I would like to test.
Like this:
module SomeHelper
def some_helper_method
"<p>foo</p>"
end
end
context "The SomeHelper"
helper_name :some
specify do
some_helper_method.should have_tag("p", "foo")
end
end
Til
ps: the new have_tag / with_tag stuff for testing views and rspec
0.8.2 in general rocks,...