aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/rubygems/gem/bin_path_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/rubygems/gem/bin_path_spec.rb')
-rw-r--r--spec/ruby/library/rubygems/gem/bin_path_spec.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/ruby/library/rubygems/gem/bin_path_spec.rb b/spec/ruby/library/rubygems/gem/bin_path_spec.rb
index 73509e9066..bfcc3fba89 100644
--- a/spec/ruby/library/rubygems/gem/bin_path_spec.rb
+++ b/spec/ruby/library/rubygems/gem/bin_path_spec.rb
@@ -20,16 +20,13 @@ describe "Gem.bin_path" do
default_specifications_dir = Gem::Specification.default_specifications_dir
end
- if Dir.exist?(default_specifications_dir)
- Gem::Specification.each_spec([default_specifications_dir]) do |spec|
- spec.executables.each do |exe|
- path = Gem.bin_path(spec.name, exe)
- File.should.exist?(path)
- end
+ skip "Could not find the default gemspecs" unless Dir.exist?(default_specifications_dir)
+
+ Gem::Specification.each_spec([default_specifications_dir]) do |spec|
+ spec.executables.each do |exe|
+ path = Gem.bin_path(spec.name, exe)
+ File.should.exist?(path)
end
- else
- # non-installed MRI, there are no default gemspecs
- 1.should == 1
end
end
end