Sha256: dd15fbfed0e116a5e4d91e1f9c5917453832a16216828bc5a7548f8dcd66b850

Contents?: true

Size: 806 Bytes

Versions: 7

Compression:

Stored size: 806 Bytes

Contents

require "spec_helper"

describe SauceWhisk::Tunnel do
  let(:params) {{
    :id => "tunnel_id",
    :owner  => "test_user",
    :status => "open",
    :host => "yacko.wacko.dot",
    :creation_time => Time.now
  }}

  describe "#new" do
    it "sets all parameters passed in" do
      tunnel = SauceWhisk::Tunnel.new params
      expect( tunnel.id ).to eq "tunnel_id"
      expect( tunnel.owner ).to eq "test_user"
      expect( tunnel.status ).to eq "open"
      expect( tunnel.host ).to eq "yacko.wacko.dot"
      expect( tunnel.creation_time ).to eq params[:creation_time]
    end
  end

  describe "#stop" do
    it "calls the Repository class" do
      tunnel = SauceWhisk::Tunnel.new params
      expect( SauceWhisk::Tunnels ).to receive(:stop).with("tunnel_id")

      tunnel.stop
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sauce_whisk-0.0.20 spec/lib/sauce_whisk/tunnel_spec.rb
sauce_whisk-0.0.19 spec/lib/sauce_whisk/tunnel_spec.rb
sauce_whisk-0.0.18 spec/lib/sauce_whisk/tunnel_spec.rb
sauce_whisk-0.0.17 spec/lib/sauce_whisk/tunnel_spec.rb
sauce_whisk-0.0.16 spec/lib/sauce_whisk/tunnel_spec.rb
sauce_whisk-0.0.15 spec/lib/sauce_whisk/tunnel_spec.rb
sauce_whisk-0.0.14 spec/lib/sauce_whisk/tunnel_spec.rb