Sha256: 6194019e6f270f682d8c4cb696c2fe6acc78d20725a5314b582f72b10cd093fd

Contents?: true

Size: 1006 Bytes

Versions: 1

Compression:

Stored size: 1006 Bytes

Contents

require 'spec_helper'

describe Selenium::WebDriver::Firefox::Profile do
  before { described_class.firebug_version = nil } # Reset

  describe ".firebug_version" do
    it "defaults to 1.11.0" do
      described_class.firebug_version.should == "1.11.0"
    end

    it "can be explicitly set" do
      described_class.firebug_version = '1.7.0'
      described_class.firebug_version.should == "1.7.0"
    end
  end

  describe "#enable_firebug" do
    it "adds the Firebug extension" do
      subject.should_receive(:add_extension).with(/firebug-1\.11\.0\.xpi$/)
      subject.enable_firebug
    end

    it "honors the configured version" do
      Selenium::WebDriver::Firefox::Profile.firebug_version = '1.6.2'
      subject.should_receive(:add_extension).with(/firebug-1\.6\.2\.xpi$/)
      subject.enable_firebug
    end

    it "accepts an optional version argument" do
      subject.should_receive(:add_extension).with(/firebug-1\.7\.0\.xpi$/)
      subject.enable_firebug("1.7.0")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capybara-firebug-1.3.0 spec/enable_firebug_spec.rb