Module: RSpec
- Defined in:
- lib/r_spec.rb,
lib/r_spec/clone.rb,
lib/r_spec/clone/dsl.rb,
lib/r_spec/clone/error.rb,
lib/r_spec/clone/logger.rb,
lib/r_spec/clone/expectation_helper.rb,
lib/r_spec/clone/expectation_target.rb,
lib/r_spec/clone/error/reserved_method.rb,
lib/r_spec/clone/expectation_helper/it.rb,
lib/r_spec/clone/expectation_helper/its.rb,
lib/r_spec/clone/error/undefined_subject.rb,
lib/r_spec/clone/expectation_target/base.rb,
lib/r_spec/clone/expectation_target/block.rb,
lib/r_spec/clone/expectation_target/value.rb,
lib/r_spec/clone/error/pending_expectation.rb,
lib/r_spec/clone/expectation_helper/shared.rb,
lib/r_spec/clone/error/undefined_described_class.rb
Overview
Top level namespace for the RSpec clone.
Defined Under Namespace
Modules: Clone
Class Method Summary collapse
-
.context(description) ⇒ Object
Defines an example group that establishes a specific context, like _empty array_ versus _array with elements_.
-
.describe(const) ⇒ Object
Defines an example group that describes a unit to be tested.
-
.it(name = nil) ⇒ nil
Defines a concrete test case.
-
.pending(message) ⇒ nil
Defines a pending test case.
Class Method Details
.context(description) ⇒ Object
Defines an example group that establishes a specific context, like _empty array_ versus _array with elements_.
86 87 88 |
# File 'lib/r_spec.rb', line 86 def self.context(description, &) Clone::Dsl.context(description, &) end |
.describe(const) ⇒ Object
Defines an example group that describes a unit to be tested.
120 121 122 |
# File 'lib/r_spec.rb', line 120 def self.describe(const, &) Clone::Dsl.describe(const, &) end |
.it(name = nil) ⇒ nil
Defines a concrete test case.
The test is performed by the block supplied to &block.
It is usually used inside a RSpec::Clone::Dsl.describe or RSpec::Clone::Dsl.context section.
146 147 148 |
# File 'lib/r_spec.rb', line 146 def self.it(name = nil, &) Clone::Dsl.it(name, &) end |
.pending(message) ⇒ nil
Defines a pending test case.
‘&block` is never evaluated. It can be used to describe behaviour that is not yet implemented.
It is usually used inside a RSpec::Clone::Dsl.describe or RSpec::Clone::Dsl.context section.
176 177 178 |
# File 'lib/r_spec.rb', line 176 def self.pending() Clone::Dsl.pending() end |