Displaying 1 result from an estimated 1 matches for "andreplace".
2008 Feb 22
7
Testing misc methods in ApplicationController
...oller
However, i can;''t work out how to test the sort of method that is added to
application_controller so that all controllers can use it. It must be
something simple that i''m doing wrong/omitting, can anyone help?
eg if i have this empty method in application_controller
def andreplace(str)
end
and my spec looks like this:
describe ApplicationController do
describe "andreplace(str)" do
it "should format ands for ferret search" do
andreplace("foo and bar").should eql("+foo +bar")
end
end
end
Currently, the test breaks...