Module: ManiokBdd::RSpec::ExampleGroup
- Defined in:
- lib/maniok_bdd/rspec/example_group.rb
Instance Method Summary collapse
- #_(message, options = {}, &block) ⇒ Object
- #And(message, options = {}, &block) ⇒ Object
- #But(message, options = {}, &block) ⇒ Object
- #Given(message, options = {}, &block) ⇒ Object
- #include_steps(*args) ⇒ Object
- #Then(message, options = {}, &block) ⇒ Object
- #When(message, options = {}, &block) ⇒ Object
Instance Method Details
#_(message, options = {}, &block) ⇒ Object
32 33 34 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 32 def _(, = {}, &block) Step :_, , , &block end |
#And(message, options = {}, &block) ⇒ Object
24 25 26 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 24 def And(, = {}, &block) Step :and, , , &block end |
#But(message, options = {}, &block) ⇒ Object
28 29 30 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 28 def But(, = {}, &block) Step :but, , , &block end |
#Given(message, options = {}, &block) ⇒ Object
12 13 14 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 12 def Given(, = {}, &block) Step :given, , , &block end |
#include_steps(*args) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 5 def include_steps(*args) name = args.shift shared_block = ::RSpec.world.shared_example_steps[name] shared_block or raise ArgumentError, "Could not find shared steps #{name.inspect}" instance_eval_with_args(*args, &shared_block) end |
#Then(message, options = {}, &block) ⇒ Object
20 21 22 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 20 def Then(, = {}, &block) Step :then, , , &block end |
#When(message, options = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/maniok_bdd/rspec/example_group.rb', line 16 def When(, = {}, &block) Step :when, , , &block end |