Sha256: 539155b9f80fd5ed9ddc78b6285e3b0efd417401f566a8df03c4a5df8842b2b8

Contents?: true

Size: 691 Bytes

Versions: 10

Compression:

Stored size: 691 Bytes

Contents

module Rscons
  describe Environment do
    describe '.parse_makefile_deps' do
      it 'handles dependencies on one line' do
        File.should_receive(:read).with('makefile').and_return(<<EOS)
module.o: source.cc
EOS
        env = Environment.new
        env.parse_makefile_deps('makefile', 'module.o').should == ['source.cc']
      end

      it 'handles dependencies split across many lines' do
        File.should_receive(:read).with('makefile').and_return(<<EOS)
module.o: module.c \\
  module.h \\
  other.h
EOS
        env = Environment.new
        env.parse_makefile_deps('makefile', 'module.o').should == [
          'module.c', 'module.h', 'other.h']
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rscons-0.0.11 spec/rscons/environment_spec.rb
rscons-0.0.10 spec/rscons/environment_spec.rb
rscons-0.0.9 spec/rscons/environment_spec.rb
rscons-0.0.8 spec/rscons/environment_spec.rb
rscons-0.0.7 spec/rscons/environment_spec.rb
rscons-0.0.6 spec/rscons/environment_spec.rb
rscons-0.0.5 spec/rscons/environment_spec.rb
rscons-0.0.4 spec/rscons/environment_spec.rb
rscons-0.0.3 spec/rscons/environment_spec.rb
rscons-0.0.2 spec/rscons/environment_spec.rb