Module: RSpec::Specify::ExampleGroup
- Defined in:
- lib/specify/rspec/example_group.rb
Instance Method Summary collapse
- #And(message, options = {}, &block) ⇒ Object
- #But(message, options = {}, &block) ⇒ Object
- #example(message, options = {}, &block) ⇒ Object
- #fact(message, options = {}, &block) ⇒ Object
-
#Given(message, options = {}, &block) ⇒ Object
rubocop:disable Naming/MethodName.
- #include_steps(*args) ⇒ Object
- #it(message, options = {}, &block) ⇒ Object
-
#rule(message, options = {}, &block) ⇒ Object
rubocop:enable Naming/MethodName.
- #specify(message, options = {}, &block) ⇒ Object
- #step(message, options = {}, &block) ⇒ Object
- #test(message, options = {}, &block) ⇒ Object
- #Then(message, options = {}, &block) ⇒ Object
- #When(message, options = {}, &block) ⇒ Object
Instance Method Details
#And(message, options = {}, &block) ⇒ Object
27 28 29 |
# File 'lib/specify/rspec/example_group.rb', line 27 def And(, = {}, &block) run_example_step(:and, , , &block) end |
#But(message, options = {}, &block) ⇒ Object
31 32 33 |
# File 'lib/specify/rspec/example_group.rb', line 31 def But(, = {}, &block) run_example_step(:but, , , &block) end |
#example(message, options = {}, &block) ⇒ Object
60 61 62 |
# File 'lib/specify/rspec/example_group.rb', line 60 def example(, = {}, &block) run_example_step(:example, , , &block) end |
#fact(message, options = {}, &block) ⇒ Object
40 41 42 |
# File 'lib/specify/rspec/example_group.rb', line 40 def fact(, = {}, &block) run_example_step(:fact, , , &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(, = {}, &block) run_example_step(:given, , , &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(, = {}, &block) run_example_step(:it, , , &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(, = {}, &block) run_example_step(:rule, , , &block) end |
#specify(message, options = {}, &block) ⇒ Object
56 57 58 |
# File 'lib/specify/rspec/example_group.rb', line 56 def specify(, = {}, &block) run_example_step(:specify, , , &block) end |
#step(message, options = {}, &block) ⇒ Object
48 49 50 |
# File 'lib/specify/rspec/example_group.rb', line 48 def step(, = {}, &block) run_example_step(:step, , , &block) end |
#test(message, options = {}, &block) ⇒ Object
44 45 46 |
# File 'lib/specify/rspec/example_group.rb', line 44 def test(, = {}, &block) run_example_step(:test, , , &block) end |
#Then(message, options = {}, &block) ⇒ Object
23 24 25 |
# File 'lib/specify/rspec/example_group.rb', line 23 def Then(, = {}, &block) run_example_step(:then, , , &block) end |
#When(message, options = {}, &block) ⇒ Object
19 20 21 |
# File 'lib/specify/rspec/example_group.rb', line 19 def When(, = {}, &block) run_example_step(:when, , , &block) end |