instiki/vendor/plugins/bundler/gems/bundler-1.0.15/spec/other/ext_spec.rb
Jacques Distler 9e909d5be3 Update Rails, rails_xss and Bundler
Update Bundler to 1.0.15.
Update Rails to 2.3.12.
Update rails_xss plugin.

The latter two were the
source of a considerable
amount of grief, as rails_xss
is now MUCH stricter about what
string methods can be used.

Also made it possible to use
rake 0.9.x with Instiki. But
you probably REALLY want to use

 ruby bundle exec rake ...

instead of just saying

 rake ....
2011-06-15 00:43:38 -05:00

37 lines
986 B
Ruby

require 'spec_helper'
describe "Gem::Specification#match_platform" do
it "does not match platforms other than the gem platform" do
darwin = gem "lol", "1.0", "platform_specific-1.0-x86-darwin-10"
darwin.match_platform(pl('java')).should be_false
end
end
describe "Bundler::GemHelpers#generic" do
include Bundler::GemHelpers
it "converts non-windows platforms into ruby" do
generic(pl('x86-darwin-10')).should == pl('ruby')
end
end
describe "Gem::SourceIndex#refresh!" do
rubygems_1_7 = Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.7.0")
before do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
G
end
it "does not explode when called", :if => rubygems_1_7 do
run "Gem.source_index.refresh!"
run "Gem::SourceIndex.new([]).refresh!"
end
it "does not explode when called", :unless => rubygems_1_7 do
run "Gem.source_index.refresh!"
run "Gem::SourceIndex.from_gems_in([]).refresh!"
end
end