Sha256: 3d926d399099dabe327e5fb5ca426ba5ce9ae1b3ba56a8eedda748bea12e301e

Contents?: true

Size: 615 Bytes

Versions: 3

Compression:

Stored size: 615 Bytes

Contents

module Symbiont
  module Assertion
    include Helpers

    def url_is(url=nil)
      url_is_empty if url.nil? or url.empty?
      @url = url
    end

    def url_matches(pattern=nil)
      url_match_is_empty if pattern.nil?
      url_match_is_empty if pattern.is_a?(String) and pattern.empty?
      @url_match = pattern
    end

    def title_is(title=nil)
      title_is_empty if title.nil? or title.empty?
      @title = title
    end
    
    def asserted_url
      @url
    end

    def url_match
      @url_match
    end

    def asserted_title
      @title
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
symbiont-0.6.0 lib/symbiont/assertions.rb
symbiont-0.5.0 lib/symbiont/assertions.rb
symbiont-0.4.0 lib/symbiont/assertions.rb