Sha256: fde54b607e98183cbd6367833b3b16b7eb5c3bdf805405717e04d9bab2194182

Contents?: true

Size: 970 Bytes

Versions: 34

Compression:

Stored size: 970 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("#{Base.storage_directory}/pool.spec").and_return true
    end
    it "should be a String" do
      Binary.get_existing_spec_location.class.should == String
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
auser-poolparty-0.2.46 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.47 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.48 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.49 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.50 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.51 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.52 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.53 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.54 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.55 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.56 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.57 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.58 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.59 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.60 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.61 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.62 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.63 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.64 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.65 spec/poolparty/helpers/binary_spec.rb