Sha256: 6504a1c365f6cf32a8bfcc93a82ff7fdad7a2a8a6cc886bd0ae766aa4417246e

Contents?: true

Size: 617 Bytes

Versions: 5

Compression:

Stored size: 617 Bytes

Contents

require 'rspec'
require 'lib/soloist'

describe Soloist::Util do
  class TestClass
    extend Soloist::Util
  end
  
  describe "walk_up_and_find_file" do
    it "raises an error when the file isn't found" do
      lambda do
        TestClass.walk_up_and_find_file(["file_not_on_the_filesystem"])
      end.should raise_error(Errno::ENOENT, "No such file or directory - file_not_on_the_filesystem not found")
    end
    
    it "doesn't raise an error if :required => false is passed" do
      TestClass.walk_up_and_find_file(["file_not_on_the_filesystem"], :required => false).should == [nil, nil]
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
ahamid-soloist-0.9.3 spec/util_spec.rb
soloist-0.9.3 spec/util_spec.rb
soloist-0.9.2 spec/util_spec.rb
soloist-0.9.1 spec/util_spec.rb
soloist-0.9.0 spec/util_spec.rb