Module: RSpec::Specify::ExampleGroup

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

Instance Method Summary collapse

Instance Method Details

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



27
28
29
# File 'lib/specify/rspec/example_group.rb', line 27

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

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



31
32
33
# File 'lib/specify/rspec/example_group.rb', line 31

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

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



60
61
62
# File 'lib/specify/rspec/example_group.rb', line 60

def example(message, options = {}, &block)
  run_example_step(:example, message, options, &block)
end

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



40
41
42
# File 'lib/specify/rspec/example_group.rb', line 40

def fact(message, options = {}, &block)
  run_example_step(:fact, message, options, &block)
end

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

rubocop:disable Naming/MethodName



15
16
17
# File 'lib/specify/rspec/example_group.rb', line 15

def Given(message, options = {}, &block)
  run_example_step(:given, message, options, &block)
end

#include_steps(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/specify/rspec/example_group.rb', line 4

def include_steps(*args)
  name = args.shift

  shared_block = ::RSpec.world.shared_example_steps[name]
  shared_block || raise(ArgumentError,
    "Unable to find shared steps '#{name.inspect}'")

  instance_exec(*args, &shared_block)
end

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



52
53
54
# File 'lib/specify/rspec/example_group.rb', line 52

def it(message, options = {}, &block)
  run_example_step(:it, message, options, &block)
end

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

rubocop:enable Naming/MethodName



36
37
38
# File 'lib/specify/rspec/example_group.rb', line 36

def rule(message, options = {}, &block)
  run_example_step(:rule, message, options, &block)
end

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



56
57
58
# File 'lib/specify/rspec/example_group.rb', line 56

def specify(message, options = {}, &block)
  run_example_step(:specify, message, options, &block)
end

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



48
49
50
# File 'lib/specify/rspec/example_group.rb', line 48

def step(message, options = {}, &block)
  run_example_step(:step, message, options, &block)
end

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



44
45
46
# File 'lib/specify/rspec/example_group.rb', line 44

def test(message, options = {}, &block)
  run_example_step(:test, message, options, &block)
end

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



23
24
25
# File 'lib/specify/rspec/example_group.rb', line 23

def Then(message, options = {}, &block)
  run_example_step(:then, message, options, &block)
end

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



19
20
21
# File 'lib/specify/rspec/example_group.rb', line 19

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