Module: Spec::Runner::ExecutionContext::InstanceMethods
- Included in:
- Spec::Runner::ExecutionContext
- Defined in:
- lib/spec/runner/execution_context.rb
Instance Method Summary collapse
- #duck_type(*args) ⇒ Object
- #initialize(spec) ⇒ Object
- #mock(name, options = {}) ⇒ Object
- #violated(message = "") ⇒ Object
Instance Method Details
#duck_type(*args) ⇒ Object
15 16 17 |
# File 'lib/spec/runner/execution_context.rb', line 15 def duck_type(*args) return Api::DuckTypeArgConstraint.new(*args) end |
#initialize(spec) ⇒ Object
5 6 7 |
# File 'lib/spec/runner/execution_context.rb', line 5 def initialize(spec) @spec = spec end |
#mock(name, options = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/spec/runner/execution_context.rb', line 9 def mock(name, ={}) mock = Api::Mock.new(name, ) @spec.add_mock(mock) mock end |
#violated(message = "") ⇒ Object
19 20 21 |
# File 'lib/spec/runner/execution_context.rb', line 19 def violated(="") raise Spec::Api::ExpectationNotMetError.new() end |