Re: [rspec-users] loading custom matchers into cucumber

2009-07-08 Thread Joaquin Rivera Padron
> > Spec::Runner.configure do |config| > # rspec should support :type => [:controller, :helper, :view] - but until > it does ... > config.include(Webrat::Matchers, :type => :controller) > config.include(Webrat::Matchers, :type => :helper) > config.include(Webrat::Matchers, :type => :view) >

Re: [rspec-users] loading custom matchers into cucumber

2009-07-08 Thread Joaquin Rivera Padron
hey ben, thanks, your solution works :-) luckily(!) a typo make get me to some prettier way (doing what webrat does), first namescoping the matchers: module MyCustom do module Matchers do Spec::Matchers.define :have_rol do |role| match do |user| user.roles.collect{ |r| r.na

Re: [rspec-users] loading custom matchers into cucumber

2009-07-08 Thread Ben Mabey
Joaquin Rivera Padron wrote: hi there, In a step I need to assert (don't know hoe to translate this into "should" terms) state before keep going, example: Perhaps you need to make an "expectation" instead of an "assert"? :) Given "I have signed up as tom who is an admin" d

Re: [rspec-users] loading custom matchers into cucumber

2009-07-08 Thread Joaquin Rivera Padron
> > hi there, > In a step I need to assert (don't know hoe to translate this into "should" > terms) state before keep going, example: > > Given "I have signed up as tom who is an admin" do |user, role| do > # call some steps to create user tom > > end > oops, sorry that was gone unfinished! G