[DRE-commits] [ruby-rspec] 17/19: fix tests
Jérémy Bobbio
lunar at alioth.debian.org
Sun Oct 20 17:01:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/multideb
in repository ruby-rspec.
commit 8e4455b8cfed0acb4a081af777641e371c287979
Author: Jérémy Bobbio <lunar at debian.org>
Date: Sun Oct 20 15:42:54 2013 +0200
fix tests
---
debian/ruby-tests.rb | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
index 082c5c0..567b237 100644
--- a/debian/ruby-tests.rb
+++ b/debian/ruby-tests.rb
@@ -1,26 +1,19 @@
-$: << '../rspec-core/spec'
-$: << '../rspec-core/lib'
require "rspec/core"
+require "yaml"
+
+# We are going to chdir in the so we need absolute paths for the libs
+$:.collect! { |p| p.start_with?('debian/') ? File.expand_path(p) : p }
+
+LIBS = %w{rspec-core rspec-expectations rspec-mocks}
+
EXC_TESTS = [
# require 'syntax' gem
'spec/rspec/core/formatters/text_mate_formatter_spec.rb',
'spec/rspec/core/formatters/html_formatter_spec.rb'
]
-Dir.chdir('rspec-core') do
- RSpec::Core::Runner.run(Dir["spec/rspec/**/*_spec.rb"] - EXC_TESTS, $stderr, $stdout) || fail
-end
-
-$: << 'spec'
-$: << 'lib'
-
-Dir.chdir('rspec-expectations') do
- RSpec::Core::Runner.run(Dir["spec/rspec/**/*_spec.rb"], $stderr, $stdout) || fail
-end
-
-#The specs need yaml to be loaded before spec_helper
-#https://github.com/rspec/rspec-mocks/issues/107
-require "yaml"
-Dir.chdir('rspec-mocks') do
- RSpec::Core::Runner.run(Dir["spec/rspec/**/*_spec.rb"], $stderr, $stdout) || fail
+LIBS.each do |lib|
+ Dir.chdir(lib) do
+ RSpec::Core::Runner.run(Dir["spec/rspec/**/*_spec.rb"] - EXC_TESTS, $stderr, $stdout) || fail
+ end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec.git
More information about the Pkg-ruby-extras-commits
mailing list