[rspec-users] Adding a custom matcher to a controller
aslak hellesoy
aslak.hellesoy at gmail.com
Wed Jan 14 06:10:41 EST 2009
On Wed, Jan 14, 2009 at 11:12 AM, Bart Zonneveld <zuperinfinite at gmail.com>wrote:
> Hey list,
>
> I've written a custom matcher (http://gist.github.com/46858) which I'd
> like to use in Cucumber specifically.
> In my spec_helper, I have required the file where the matcher lives in, and
> added it to Spec::Runner.configure.
> In one of my cucumber steps, I have: response.should have_notice("foo").
> However, when I run the feature, I get the following error:
> undefined method `has_notice?' for
> #<ActionController::CgiResponse:0x308fc84> (NoMethodError)
> Note the has_notice?...
>
> Any ideas on how to add this matcher to the response?
>
World do |world|
world.extend(Matchers)
world
end
Documented here:
http://wiki.github.com/aslakhellesoy/cucumber/a-whole-new-world
Aslak
>
> cheers,
> bartz
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090114/8bc1c671/attachment.html>
More information about the rspec-users
mailing list