Sha256: 153cd284a117ef2a01ce16cd59a6b1468834ed5b366d00bebae30fb7d769f9d1

Contents?: true

Size: 611 Bytes

Versions: 5

Compression:

Stored size: 611 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

5 entries across 5 versions & 1 rubygems

Version Path
symbiont-0.11.0 lib/symbiont/assertions.rb
symbiont-0.10.0 lib/symbiont/assertions.rb
symbiont-0.9.0 lib/symbiont/assertions.rb
symbiont-0.8.0 lib/symbiont/assertions.rb
symbiont-0.7.0 lib/symbiont/assertions.rb