Sha256: bfa6532e00ff81baeaa5976643e6e924f41a0b1801697ae9fd2fcc19de1eca70
Contents?: true
Size: 689 Bytes
Versions: 5
Compression:
Stored size: 689 Bytes
Contents
RSpec::Matchers.define :map_specs do |specs| match do |autotest| @specs = specs @autotest = prepare(autotest) autotest.test_files_for(@file) == specs end chain :to do |file| @file = file end if respond_to?(:failure_message) failure_message do "expected #{@autotest.class} to map #{@specs.inspect} to #{@file.inspect}\ngot #{@actual.inspect}" end else failure_message_for_should do "expected #{@autotest.class} to map #{@specs.inspect} to #{@file.inspect}\ngot #{@actual.inspect}" end end def prepare(autotest) find_order = @specs.dup << @file autotest.instance_eval { @find_order = find_order } autotest end end
Version data entries
5 entries across 5 versions & 1 rubygems