Sha256: 7c9e17f5977505a9505ed84a5e89597ee26571af517d4fb3e3a557dfb4b4f819

Contents?: true

Size: 583 Bytes

Versions: 7

Compression:

Stored size: 583 Bytes

Contents

module Symbiont
  module Assertion
    include Helpers

    def url_is(url = nil)
      url_is_empty if url.nil? || 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) && pattern.empty?
      @url_match = pattern
    end

    def title_is(title = nil)
      title_is_empty if title.nil? || 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

7 entries across 7 versions & 1 rubygems

Version Path
symbiont-1.2.0 lib/symbiont/assertions.rb
symbiont-1.1.2 lib/symbiont/assertions.rb
symbiont-1.1.0 lib/symbiont/assertions.rb
symbiont-1.0.0 lib/symbiont/assertions.rb
symbiont-0.14.0 lib/symbiont/assertions.rb
symbiont-0.13.0 lib/symbiont/assertions.rb
symbiont-0.12.0 lib/symbiont/assertions.rb