Sha256: dabb3b569a7197150268d4955ae4c8752dfbd1894989b234af4fd111076c7e6d

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

require 'spec_helper'

describe Codependency::Node do
  let( :path ){ File.join( File.dirname( __FILE__ ), '../fixtures' ) }

  context 'when the file exists' do
    subject { Codependency::Node.new "#{path}/planet.rb" }

    its( :dependencies ){ should eq( [ "#{path}/body.rb" ] ) }
  end

  context 'when the file does not exist' do
    it 'should raise an error' do
      expect {
        Codependency::Node.new "#{path}/pluto.rb"
      }.to raise_error( Errno::ENOENT )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
codependency-0.1.0 spec/codependency/node_spec.rb