Sha256: 334d90d4d95b5ac7d3e6c5ca84ebc8251aa9c48ef320813c49f616c07600b956
Contents?: true
Size: 417 Bytes
Versions: 11
Compression:
Stored size: 417 Bytes
Contents
RSpec::Matchers.define :be_a_file do match do |path| @path = path.to_s file? && content_matches? end def with_content(content) @content = content self end def file? File.file?(@path) end def content_matches? case @content when String File.read(@path).strip == @content.strip when Regexp File.read(@path) =~ @content else true end end end
Version data entries
11 entries across 11 versions & 1 rubygems