Sha256: 7f0651186a7c4a0acb535a71fb3166451cbe85ba3ce938d00854b9f76f1cf030

Contents?: true

Size: 962 Bytes

Versions: 27

Compression:

Stored size: 962 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!(:file?).and_return false
      ::File.stub!(:file?).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

27 entries across 27 versions & 2 rubygems

Version Path
auser-poolparty-0.2.15 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.16 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.20 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.21 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.22 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.23 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.24 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.25 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.26 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.3 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.35 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.36 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.37 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.38 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.39 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.4 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.40 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.41 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.42 spec/poolparty/helpers/binary_spec.rb
auser-poolparty-0.2.44 spec/poolparty/helpers/binary_spec.rb