Sha256: c138b0d4c987092a8f5779afd9ee8dd37558e54439db3266c3075267d9236350

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

require "spec_helper"

describe WildcardFinders::Matchers do
  include WildcardFinders::Matchers

  context ".has_anchor_like?" do
    it "returns true when there is an anchor" do
      visit "/a"
      page.has_anchor_like?(href: /hoge/).should be_true
    end

    it "returns true when ther are no anchors" do
      visit "/a"
      page.has_anchor_like?(href: /not_exist/).should be_false
    end
  end

  context ".has_no_anchor_like?" do
    it "returns true when there is an anchor" do
      visit "/a"
      page.has_no_anchor_like?(href: /hoge/).should be_false
    end

    it "returns true when ther are no anchors" do
      visit "/a"
      page.has_no_anchor_like?(href: /not_exist/).should be_true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wildcard_finders-0.1.0 spec/wildcard_finders/matchers_spec.rb