3 ms·
I dev in Ruby also, but the features, stories, and scenarios in Cucumber can read fairly well, even if the step definitions make it tougher than it would appear
by devmonk 16y ago
I dev in Ruby also, but the features, stories, and scenarios in Cucumber can read fairly well, even if the step definitions make it tougher than it would appear to be.
Agreed that Steak is simpler overall. Cucumber could have used the time spent supporting LOLZ on something more useful:
OH HAI: STUFFING
MISHUN: CUCUMBR
I CAN HAZ IN TEH BEGINNIN 3 CUCUMBRZ
WEN I EAT 2 CUCUMBRZ
DEN I HAZ 2 CUCUMBERZ IN MAH BELLY
AN IN TEH END 1 CUCUMBRZ KTHXBAI
step implementations:
ICANHAZ /^IN TEH BEGINNIN (d+) CUCUMBRZ$/ do |n|
@basket = Basket.new(n.to_i)
end
WEN /^I EAT (d+) CUCUMBRZ$/ do |n|
@belly = Belly.new
@belly.eat(@basket.take(n.to_i))
end
DEN /^I HAZ (d+) CUCUMBERZ IN MAH BELLY$/ do |n|
@belly.cukes.should == n.to_i
end
DEN /^IN TEH END (d+) CUCUMBRZ KTHXBAI$/ do |n|
@basket.cukes.should == n.to_i
end
(from http://www.engineyard.com/blog/2009/cucumber-introduction/ http://www.engineyard.com/blog/2009/cucumber-introduction/ )