diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-01-23 20:09:49 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-01-25 10:49:51 -0600 |
commit | bccfcb72966a921a6cda30784226a303f664db29 (patch) | |
tree | a93d231d90e219a27a1b1821697fcbe13c1b02e8 /spec | |
parent | e76bab78a1b72f9b73dc05e263f12d1f926edcf2 (diff) | |
download | bundler-bccfcb72966a921a6cda30784226a303f664db29.tar.gz |
Ensure there are no warnings in all files
Diffstat (limited to 'spec')
-rw-r--r-- | spec/quality_spec.rb | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb index c9c7e7d8..79a41462 100644 --- a/spec/quality_spec.rb +++ b/spec/quality_spec.rb @@ -86,16 +86,23 @@ describe "The library itself" do end it "does not contain any warnings" do - Dir.chdir(root.join("lib")) - exclusions = %r{bundler/capistrano\.rb|bundler/vlad\.rb|bundler/gem_tasks\.rb|tmp/rubygems} - lib_files = `git ls-files -z -- **/*.rb`.split("\x0").reject {|f| f =~ exclusions } - sys_exec("ruby -w -I. ", :expect_err) do |input| - lib_files.each do |f| - input.puts "require '#{f.gsub(/\.rb$/, "")}'" + Dir.chdir(root.join("lib")) do + exclusions = %w( + bundler/capistrano.rb + bundler/gem_tasks.rb + bundler/vendor/thor/lib/thor/rake_compat.rb + bundler/vlad.rb + ) + lib_files = `git ls-files -z`.split("\x0").grep(/\.rb$/) - exclusions + lib_files.map! {|f| f.chomp(".rb") } + sys_exec("ruby -w -I. ", :expect_err) do |input| + lib_files.each do |f| + input.puts "require '#{f}'" + end end - end - expect(@err.split("\n")).to eq([]) - expect(@out).to eq("") + expect(@err.split("\n")).to be_well_formed + expect(@out.split("\n")).to be_well_formed + end end end |