Sha256: 92279258f867da6e660ee0bdf3f329c76a9fcb9230aaa9c9662b8fd2e06a7eaa
Contents?: true
Size: 859 Bytes
Versions: 9
Compression:
Stored size: 859 Bytes
Contents
module GenSpec module Matchers class ResultMatcher < GenSpec::Matchers::Base attr_reader :filename def initialize(filename, &block) @filename = filename super(&block) end def generated if filename path = File.join(destination_root, filename) if File.exist?(path) match! spec_file_contents(path) end else # there was no error, so in the context of # "should generate", it most certainly # generated. match! if block block.call end end end def failure_message "Expected to generate #{filename}" end def negative_failure_message "Expected to not generate #{filename}" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems