Sha256: 136778e2f74444efd60fdcc3783fbc4be76a84c5e4c9dc35b17aea07c962941d

Contents?: true

Size: 959 Bytes

Versions: 22

Compression:

Stored size: 959 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require File.dirname(__FILE__) + '/../../../lib/poolparty/helpers/binary'

describe "Binary" do
  before(:each) do
    Dir.stub!(:[]).and_return %w(init console)
  end
  it "should have the binary location set on Binary" do
    Binary.binary_directory.should =~ /lib\/poolparty\/helpers\/\.\.\/\.\.\/\.\.\/bin/
  end
  it "should be able to list the binaries in the bin directory" do
    Binary.available_binaries_for("pool").should == %w(console init)
  end
  it "should be able to say the binary is in the binary_directory" do
    Binary.available_binaries_for("pool").include?("console")
  end
  describe "get_existing_spec_location" do
    before(:each) do
      ::File.stub!(:readable?).and_return false
      ::File.stub!(:readable?).with("/etc/poolparty/clouds.rb").and_return true
    end
    it "should be a String" do
      Binary.get_existing_spec_location.class.should == String
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
auser-poolparty-1.1.1 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.1.3 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.1.4 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.1.5 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.1.6 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.1.7 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.0 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.1 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.10 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.11 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.12 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.2 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.3 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.4 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.7 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.8 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-1.2.9 spec/poolparty/helpers/binary_spec.rb
fairchild-poolparty-1.1.3 spec/poolparty/helpers/binary_spec.rb
fairchild-poolparty-1.1.4 spec/poolparty/helpers/binary_spec.rb
fairchild-poolparty-1.1.5 spec/poolparty/helpers/binary_spec.rb