I have something like:
class Foo
def initialize(template)
@template = template
end
def link
link_to "foo", foo_path
end
def method_missing(*args, &block)
@template.send(*args, &block)
end
end
...
before(:all) do
@foo = Foo.new(self)
end
it "should have a link" do
@foo.link.should match /href/
end
... But I get this error:
NoMethodError in 'FooRenderer should have a link'
undefined method `foo_path' for
#<ActiveSupport::TestCase::Subclass_1:0x105619710>
... What can I include in my spec to get foo_path to be recognized?
Thank you.
Patrick J. Collins
http://collinatorstudios.com
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users