Class: Assert::Result::Skip

Inherits:
Base
  • Object
show all
Defined in:
lib/assert/result.rb,
lib/assert/result.rb

Instance Attribute Summary

Attributes inherited from Base

#backtrace, #message, #test

Instance Method Summary collapse

Methods inherited from Base

#==, #inspect, #set_backtrace, #test_name, #to_s, #trace

Constructor Details

#initialize(test, exception) ⇒ Skip

skip results are generated by raising Assert::Result::TestSkipped


124
125
126
127
128
129
130
# File 'lib/assert/result.rb', line 124

def initialize(test, exception)
  if exception.kind_of?(TestSkipped)
    super(test, exception.message, exception.backtrace || [])
  else
    raise ArgumentError, "generate skip results by raising Assert::Result::TestSkipped"
  end
end

Instance Method Details

#nameObject


135
136
137
# File 'lib/assert/result.rb', line 135

def name
  "Skip"
end

#skip?Boolean

Returns:

  • (Boolean)

132
# File 'lib/assert/result.rb', line 132

def skip?; true; end

#to_symObject


133
# File 'lib/assert/result.rb', line 133

def to_sym; :skip; end