lib/lopata/step.rb in lopata-0.1.20 vs lib/lopata/step.rb in lopata-0.1.21

- old
+ new

@@ -86,10 +86,14 @@ def let_methods @let_methods ||= {} end + def let_bang_methods + @let_bang_methods ||= {} + end + private # Group step's block is a block in context of builder, not scenario. So hide the @block to not be used in scenario. def initialized! builder = Lopata::ScenarioBuilder.new(title) @@ -184,8 +188,13 @@ end # Step methods is a combination of let_methods for all contexts (group) the step included def let_methods (groups).compact.inject({}) { |merged, part| merged.merge(part.let_methods) } + end + + # Step bang methods is a combination of let_bang_methods for all contexts (group) the step included + def let_bang_methods + (groups).compact.inject({}) { |merged, part| merged.merge(part.let_bang_methods) } end end end