lib/linepipe/dsl.rb in linepipe-0.1.2 vs lib/linepipe/dsl.rb in linepipe-0.2.0
- old
+ new
@@ -10,10 +10,11 @@
def data(data=nil, &block)
@data = data ? -> { data } : block
end
def step(name=nil, &block)
- @steps << Step.new(name, &block)
+ @steps << step = Step.new(name, &block)
+ step
end
def expect(msg=nil, &block)
@expectations << Expectation.new(msg, method(:log), &block)
end