erikedin / Behavior.jl

Tool for Behavior Driven Development in Julia
Other
25 stars 3 forks source link

Change the step implementations to take the context parameter explicitly #68

Closed erikedin closed 3 years ago

erikedin commented 3 years ago

Instead of

@given "some precondition" begin
end

the user will write

@given "some precondition" do context

end
erikedin commented 3 years ago

Alternative 1:

@given("some precondition") do context

end

Alternative 2:

@given "some precondition" context -> begin

end

Is not syntactically correct:

@given "some precondition" do context

end

This fails with

ERROR: LoadError: syntax: invalid "do" syntax

@tk3369 I'll go with alternative 1, unless you have objections.

tk3369 commented 3 years ago

I agree. Alternative 1 looks good.