Exception: Scampi::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/scampi/error.rb

Overview

Custom exception used internally to signal spec failures and missing assertions. The count_as attribute determines whether the error increments the :failed or :missing counter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count_as, message) ⇒ Error

Returns a new instance of Error.



11
12
13
14
# File 'lib/scampi/error.rb', line 11

def initialize(count_as, message)
  @count_as = count_as
  super message
end

Instance Attribute Details

#count_asObject

Returns the value of attribute count_as.



7
8
9
# File 'lib/scampi/error.rb', line 7

def count_as
  @count_as
end

Instance Method Details

#Either `:failed` or `:missing`.=(`: failed`) ⇒ Object



7
# File 'lib/scampi/error.rb', line 7

attr_accessor :count_as