ok, let's say: Then /should see "(.+)"/ do |text| # a binary step, easily negable end
Then /I deny some steps/ do # really not so readable Not Then "should see \"your are not log in\"" Then "some other step that holds" # another way of saying it bad But Not Then "should receive info for non users" # or maybe this bad And Not Then "should receive info for non users" end now comes the mars attack part, I haven't dig into cucumber or rspec code that much, only guessing here. and Not could do something like receiving the step that comes behind the keyword def Not(step) # we tell the step to assert (I mean the rspec synonym) itself # so that it raises some RSpec exception step.assert! # the step really passed, we should raise an Exception not rescueable for the next rescue raise Spec::UncatchableException rescue Spec::Expectations # or something like that # green, nothing, this is what we expected end end is this doable? I have to say I have not come to need this that bad to ask the cucumber to provide it is really late and this cross my mind :-) joaquin
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users