Module: Spec::DSL::BehaviourEval::InstanceMethods
- Defined in:
- lib/spec/dsl/behaviour_eval.rb
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Object
:nodoc:.
- #inspect ⇒ Object
- #pending(message) ⇒ Object
- #violated(message = "") ⇒ Object
Instance Method Details
#initialize(*args, &block) ⇒ Object
:nodoc:
203 204 205 206 |
# File 'lib/spec/dsl/behaviour_eval.rb', line 203 def initialize(*args, &block) #:nodoc: # TODO - inheriting from TestUnit::TestCase fails without this # - let's figure out why and move this somewhere else end |
#inspect ⇒ Object
212 213 214 |
# File 'lib/spec/dsl/behaviour_eval.rb', line 212 def inspect "[RSpec example]" end |
#pending(message) ⇒ Object
216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/spec/dsl/behaviour_eval.rb', line 216 def pending() if block_given? begin yield rescue Exception => e raise Spec::DSL::ExamplePendingError.new() end raise Spec::DSL::PendingFixedError.new("Expected pending '#{}' to fail. No Error was raised.") else raise Spec::DSL::ExamplePendingError.new() end end |
#violated(message = "") ⇒ Object
208 209 210 |
# File 'lib/spec/dsl/behaviour_eval.rb', line 208 def violated(="") raise Spec::Expectations::ExpectationNotMetError.new() end |