Sha256: adaf04cbc3b796b1fc4452433d1792d2105deb2393e5b7aa2088494970f96e9e
Contents?: true
Size: 923 Bytes
Versions: 2
Compression:
Stored size: 923 Bytes
Contents
ENV['MT_NO_EXPECTATIONS'] = 'true' require 'bundler/setup' require 'minitest/autorun' require 'minitest/focus' require 'minitest/pride' require 'bogus/minitest/spec' require 'lovely_rufus' require_relative '../lib/lovely_rufus/layers/layer' require_relative '../lib/lovely_rufus/wrap' Bogus.configure do |config| config.search_modules << LovelyRufus << LovelyRufus::Layers end class String def dedent gsub(/^#{scan(/^ +/).min}/, '') end end module CustomAssertions def assert_passes_to_next(subject, called_with, to_be_passed) next_layer = fake(:layer, call: LovelyRufus::Wrap.new) subject.new(next_layer).call called_with assert_received next_layer, :call, [to_be_passed] end end Minitest::Test.include CustomAssertions module Minitest module Expectations class << LovelyRufus::Layers::Layer infect_an_assertion :assert_passes_to_next, :must_pass_to_next, true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lovely_rufus-1.0.0 | test/test_helper.rb |
lovely_rufus-0.3.2 | test/test_helper.rb |