Sha256: f99ea31f2d0d0e95eafa42bfe99cd12d4b9428aa4d05f5bf80492c4430726d31
Contents?: true
Size: 826 Bytes
Versions: 15
Compression:
Stored size: 826 Bytes
Contents
module RSpec::RubyContentMatchers class HaveRegion < RSpec::RubyContentMatcher attr_reader :region def initialize(region) @region = region.to_s super @region end def failure_message super "Expected there to be a #{region} region" end def negative_failure_message super "Did no expected there to be a #{region} region" end protected def main_expr "#{region}" + ANY_GROUP end def end_expr '(private|protected|public|$)' end end def have_region name HaveRegion.new name end def have_public HaveRegion.new :public end def have_protected HaveRegion.new :protected end def have_private HaveRegion.new :private end end
Version data entries
15 entries across 15 versions & 2 rubygems