Module: RSpec::Stepwise
- Defined in:
- lib/rspec/stepwise.rb,
lib/rspec/stepwise/version.rb
Overview
Provides DSL for defining a series of steps.
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.1.0'
Instance Method Summary collapse
-
#stepwise(name = nil, *args, &block) ⇒ Object
Defines new series of steps.
Instance Method Details
#stepwise(name = nil, *args, &block) ⇒ Object
Defines new series of steps. Supports the same arguments as ‘RSpec.describe`.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rspec/stepwise.rb', line 24 def stepwise(name = nil, *args, &block) if args.last.is_a?(Hash) args.last[:order] = :defined else args << { order: :defined } end describe(name, *args) do Builder.new(self).instance_eval(&block) end end |