Sha256: bd8a3ccc68fc0b8b3d7bb1a1159068d5cc65cf3e4b04d1c1ca777d22a7214905
Contents?: true
Size: 785 Bytes
Versions: 10
Compression:
Stored size: 785 Bytes
Contents
require 'rr' module Riot module RR class Situation < Riot::Situation include ::RR::Adapters::RRMethods end # Situation class Assertion < Riot::Assertion def run(situation) result = super situation.verify result rescue ::RR::Errors::RRError => e result.first == :pass ? [:fail, e.message.gsub(/\n/, " ")] : result ensure situation.reset end end # Assertion module ContextHelpers private def assertion_class; Riot::RR::Assertion; end def situation_class; Riot::RR::Situation; end end # ContextHelpers def self.enable(context_class) context_class.instance_eval { include Riot::RR::ContextHelpers } end end # RR end # Riot Riot::RR.enable(Riot::Context)
Version data entries
10 entries across 10 versions & 1 rubygems