Module: Expectations::Results

Included in:
BehaviorBasedFailure, Error, Fulfilled, StateBasedFailure
Defined in:
lib/expectations/results.rb,
lib/expectations/results.rb,
lib/expectations/results.rb,
lib/expectations/results.rb,
lib/expectations/results.rb

Defined Under Namespace

Modules: BehaviorBasedFailure, ClassMethods, Error, Fulfilled, StateBasedFailure

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



18
19
20
# File 'lib/expectations/results.rb', line 18

def self.included(klass)
  klass.extend ClassMethods
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/expectations/results.rb', line 14

def error?
  self.is_a?(Expectations::Results::Error)
end

#failure?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/expectations/results.rb', line 10

def failure?
  self.is_a?(Expectations::Results::StateBasedFailure) || self.is_a?(Expectations::Results::BehaviorBasedFailure)
end

#fulfilled?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/expectations/results.rb', line 6

def fulfilled?
  self.is_a?(Expectations::Results::Fulfilled)
end

#initialize(file, line) ⇒ Object



2
3
4
# File 'lib/expectations/results.rb', line 2

def initialize(file, line)
  self.line, self.file = line, file
end