Sha256: 45041622ad5ca0dd8f929ec5935e63063f58affd8f0a771d7da613f4f7752685

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

require 'simplecov'
require 'simplecov-rcov'
require 'timecop'

SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start do
  add_filter "./spec/"
end

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'health_reporter'


def reset_lambda_runner_spy
  @test_variable_from_sender = Random.new.rand(1...100000000000)
  @test_variable_from_receiver = 0
end

def spy_lambda_was_run?
  @test_variable_from_receiver == @test_variable_from_sender
end

def spy_lambda_returning_false
  lambda{
    @test_variable_from_receiver = @test_variable_from_sender
    return false
  }
end

def spy_lambda_returning_true
  lambda{
    @test_variable_from_receiver = @test_variable_from_sender
    return true
  }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
health-reporter-0.0.3 spec/spec_helper.rb
health-reporter-0.0.2 spec/spec_helper.rb