Sha256: f95e36e1d8c2b58e67315923ab50f1e132ad1874f3fa41692fb807a73ceb65b5

Contents?: true

Size: 981 Bytes

Versions: 1

Compression:

Stored size: 981 Bytes

Contents

require "spec_helper"

class TestDruid
  include Druid
end

describe Druid do
  let(:driver){mock_driver}
  let(:druid){TestDruid.new driver}

  context "when created with a watir-webdriver browser" do
    it "should include the Druid module" do
      expect(druid).to be_kind_of Druid
    end
  end

  describe "page level functionality" do
    context "when using Druid" do
      it "should display the page text" do
        expect(druid).to receive(:text).and_return("browser text")
        expect(druid.text).to eql "browser text"
      end

      it "should display the html of the page" do
        expect(druid).to receive(:html).and_return("<html>Some Sample HTML</html>")
        expect(druid.html).to eql "<html>Some Sample HTML</html>"
      end

      it "should display the title of the page" do
        expect(druid).to receive(:title).and_return("I am the title of a page")
        expect(druid.title).to eql "I am the title of a page"
      end
    end
  end



end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
druid-ts-0.0.1 spec/druid/druid_spec.rb