Sha256: bd22ab55f2ebff0a2d58269facc94c356ff9fccfba7960ee417bf6c7781f7883

Contents?: true

Size: 1004 Bytes

Versions: 1

Compression:

Stored size: 1004 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.12.4" do
      described_class.firebug_version.should == "2.0.2"
    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-2\.0\.2\.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-2.1.0 spec/enable_firebug_spec.rb