Sha256: 039aaefee4a2b4a3dd22323a7210ad0ecb1e64365218ca220412d501b271f48a

Contents?: true

Size: 870 Bytes

Versions: 8

Compression:

Stored size: 870 Bytes

Contents

require 'mocha-on-bacon'
require File.expand_path('../motion_stub.rb', __FILE__)
require 'bubble-wrap'

describe BubbleWrap do
  describe '.root' do
    it 'returns an absolute path' do
      BubbleWrap.root[0].should == '/'
    end
  end

  describe '.require' do
    it 'delegates to Requirement.scan' do
      BW::Requirement.expects(:scan)
      BW.require('foo')
    end

    it 'finds files with relative paths' do
      BW::Requirement.clear!
      BW.require '../motion/core.rb'
      BW::Requirement.files.member?(File.expand_path('../../../motion/core.rb', __FILE__)).should == true
    end

    it 'finds files with absolute paths' do
      BW::Requirement.clear!
      BW.require File.expand_path('../../../motion/core.rb', __FILE__)
      BW::Requirement.files.member?(File.expand_path('../../../motion/core.rb', __FILE__)).should == true
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.6 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.5 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.4 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.3 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.2 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.1 spec/lib/bubble-wrap_spec.rb
bubble-wrap-1.9.0 spec/lib/bubble-wrap_spec.rb