test/test_jim_bundler.rb in jim-0.2.0 vs test/test_jim_bundler.rb in jim-0.2.1
- old
+ new
@@ -5,12 +5,12 @@
context "Jim::Bundler" do
setup do
# clear the tmp dir
FileUtils.rm_rf(tmp_path) if File.directory?(tmp_path)
root = File.dirname(__FILE__)
- @directories = [File.join(root, 'fixtures'), File.join(root, 'tmp', 'lib')]
- Jim::Installer.new(fixture_path('infoincomments.js'), tmp_path).install
+ @directories = [File.join(root, 'tmp', 'lib'), File.join(root, 'fixtures')]
+ Jim::Installer.new(fixture_path('infoincomments.js'), File.join(root, 'tmp', 'lib')).install
@bundler = Jim::Bundler.new(fixture('jimfile'), Jim::Index.new(@directories))
end
context "initialize" do
@@ -40,11 +40,11 @@
should "find projects listed in the jimfile and set paths" do
assert @bundler.paths.empty?
@bundler.resolve!
assert @bundler.paths
- assert_equal 2, @bundler.paths.length
+ assert_equal 3, @bundler.paths.length
@bundler.paths.each do |path, name, version|
assert path.is_a?(Pathname)
assert name.is_a?(String)
end
end
@@ -63,14 +63,14 @@
end
context "vendor!" do
- should "copy files in jemfile to path specified" do
+ should "copy files in jimfile to path specified" do
vendor_dir = Pathname.new(tmp_path) + 'vendor'
@bundler.vendor!(vendor_dir)
- assert_readable vendor_dir + 'jquery-1.4.1.js'
assert_readable vendor_dir + 'myproject-1.2.2.js'
+ assert !File.readable?(vendor_dir + 'localfile.js'), "shouldnt vendor local files"
end
end
context "bundle!" do