Module: ManiokBdd::RSpec::ExampleGroup

Defined in:
lib/maniok_bdd/rspec/example_group.rb

Instance Method Summary collapse

Instance Method Details

#_(message, options = {}, &block) ⇒ Object



32
33
34
# File 'lib/maniok_bdd/rspec/example_group.rb', line 32

def _(message, options = {}, &block)
  Step :_, message, options, &block
end

#And(message, options = {}, &block) ⇒ Object



24
25
26
# File 'lib/maniok_bdd/rspec/example_group.rb', line 24

def And(message, options = {}, &block)
  Step :and, message, options, &block
end

#But(message, options = {}, &block) ⇒ Object



28
29
30
# File 'lib/maniok_bdd/rspec/example_group.rb', line 28

def But(message, options = {}, &block)
  Step :but, message, options, &block
end

#Given(message, options = {}, &block) ⇒ Object



12
13
14
# File 'lib/maniok_bdd/rspec/example_group.rb', line 12

def Given(message, options = {}, &block)
  Step :given, message, options, &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(message, options = {}, &block)
  Step :then, message, options, &block
end

#When(message, options = {}, &block) ⇒ Object



16
17
18
# File 'lib/maniok_bdd/rspec/example_group.rb', line 16

def When(message, options = {}, &block)
  Step :when, message, options, &block
end