Module: XSpec::DSL
- Included in:
- Context
- Defined in:
- lib/xspec/dsl.rb
Instance Method Summary collapse
- #describe(*args, &block) ⇒ Object
- #include_context(context) ⇒ Object
- #it(*args, &block) ⇒ Object
- #let(*args, &block) ⇒ Object
- #shared_context(*args, &block) ⇒ Object
Instance Method Details
#describe(*args, &block) ⇒ Object
15 16 17 |
# File 'lib/xspec/dsl.rb', line 15 def describe(*args, &block) __xspec_context.add_child_context(*args, &block) end |
#include_context(context) ⇒ Object
27 28 29 |
# File 'lib/xspec/dsl.rb', line 27 def include_context(context) __xspec_context.copy_into_tree(context) end |
#it(*args, &block) ⇒ Object
11 12 13 |
# File 'lib/xspec/dsl.rb', line 11 def it(*args, &block) __xspec_context.add_unit_of_work(*args, &block) end |
#let(*args, &block) ⇒ Object
19 20 21 |
# File 'lib/xspec/dsl.rb', line 19 def let(*args, &block) __xspec_context.add_memoized_method(*args, &block) end |
#shared_context(*args, &block) ⇒ Object
23 24 25 |
# File 'lib/xspec/dsl.rb', line 23 def shared_context(*args, &block) __xspec_context.create_shared_context(*args, &block) end |