Sha256: 0a5577ca01bd9dd9b2a1c2aad7be51f6d9bb462ea9b0ff5f1b4852402e6ef945
Contents?: true
Size: 340 Bytes
Versions: 3
Compression:
Stored size: 340 Bytes
Contents
module BaconExpect; module Matcher class EndWith def initialize(end_string) @end_string = end_string end def matches?(subject) subject[-@end_string.size..-1] == @end_string end def fail!(subject) raise FailedExpectation.new("#{subject} expected to end with #{@start_string}") end end end; end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bacon-expect-1.0.2 | lib/bacon-expect/matchers/end_with.rb |
bacon-expect-1.0.1 | lib/bacon-expect/matchers/end_with.rb |
bacon-expect-0.1 | lib/bacon-expect/matchers/end_with.rb |