Sha256: 78dc907e160250105621d5cb7294a30e418dd3bf23ce6fa869c3987ddddbbdf5

Contents?: true

Size: 960 Bytes

Versions: 8

Compression:

Stored size: 960 Bytes

Contents

require "spec_helper"

describe SauceWhisk do
  describe "##base_url" do
    subject {SauceWhisk.base_url}
    it {should eq "https://saucelabs.com/rest/v1"}

  end

  describe "##username" do
    subject {SauceWhisk.username}
    it {should eq ENV["SAUCE_USERNAME"]}
  end

  describe "##password" do
    subject {SauceWhisk.password}
    it {should eq ENV["SAUCE_ACCESS_KEY"]}
  end

  describe "##pass_job" do
    it "should call #pass on the jobs object" do
      job_id = "0418999"
      SauceWhisk::Jobs.should_receive(:pass_job).with(job_id) {true}
      SauceWhisk.pass_job job_id
    end
  end

  describe "##logger" do
    it "accepts a logger object" do
      dummy_logger = Object.new do
        def puts(input)
        end
      end
      SauceWhisk.logger = dummy_logger
      SauceWhisk.logger.should be dummy_logger
    end

    it "defaults to STDIN" do
      SauceWhisk.logger = nil
      SauceWhisk.logger.should be STDOUT
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sauce_whisk-0.0.11 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.10 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.9 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.8 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.7 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.5 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.4 spec/lib/sauce_whisk/sauce_whisk_spec.rb
sauce_whisk-0.0.3 spec/lib/sauce_whisk/sauce_whisk_spec.rb