Class: Allgood::CheckRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/allgood/configuration.rb

Instance Method Summary collapse

Instance Method Details

#expect(actual) ⇒ Object



183
184
185
# File 'lib/allgood/configuration.rb', line 183

def expect(actual)
  Expectation.new(actual)
end

#make_sure(condition, message = nil) ⇒ Object



175
176
177
178
179
180
181
# File 'lib/allgood/configuration.rb', line 175

def make_sure(condition, message = nil)
  if condition
    { success: true, message: message || "Check passed" }
  else
    raise CheckFailedError.new(message || "Check failed")
  end
end