debian/0000755000000000000000000000000012045001006007152 5ustar debian/rules0000755000000000000000000000132712044651003010244 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby build: dh build --buildsystem=ruby --with ruby pod2man --section=1 --release="cutest-1.1.2" \ --center="Debian GNU System" debian/cutest.1.pod \ >debian/cutest.1 clean: dh clean --buildsystem=ruby --with ruby if [ -f debian/cutest.1 ]; then rm debian/cutest.1; fi debian/copyright0000644000000000000000000000253112045000355011114 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: cutest Source: http://github.com/djanowski/cutest Files: * Copyright: 2010 Damian Janowski & Michel Martens License: Expat Files: debian/* Copyright: 2011-2012 Praveen Arimbrathodiyil License: Expat License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/compat0000644000000000000000000000000212044651003010357 0ustar 7 debian/patches/0000755000000000000000000000000012044775512010624 5ustar debian/patches/absolute-filepaths-in-test.patch0000644000000000000000000000552212044775512017025 0ustar From: Srihari (http://joindiaspora.com/u/srihari) Subject: Use File.realpath in tests instead of relative paths Tests were failing because upstream was expecting a different path Origin: https://github.com/srih4ri/cutest/commit/58bce31398a1943480ded600ae8b58715198c1ec Bug: https://github.com/djanowski/cutest/issues/6 diff --git a/test/fixtures/failure_in_loaded_file.rb b/test/fixtures/failure_in_loaded_file.rb index 39e916a..f973e5b 100644 --- a/test/fixtures/failure_in_loaded_file.rb +++ b/test/fixtures/failure_in_loaded_file.rb @@ -1 +1 @@ -load("test/fixtures/failure.rb") +load(File.realpath("test/fixtures/failure.rb")) diff --git a/test/run.rb b/test/run.rb index 06f2fa7..e63d4d7 100644 --- a/test/run.rb +++ b/test/run.rb @@ -7,49 +7,54 @@ test "output of successful run" do end test "output of failed run" do + file = File.realpath('test/fixtures/failure.rb') expected = "\n" + " test: failed assertion\n" + " line: assert false\n" + - " file: test/fixtures/failure.rb +2\n\n" + + " file: #{file} +2\n\n" + "Cutest::AssertionFailed: expression returned false\n\n" - out = %x{./bin/cutest test/fixtures/failure.rb} + out = %x{./bin/cutest #{file}} assert_equal(expected, out) end test "output of failed run" do + file = File.realpath('test/fixtures/exception.rb') expected = "\n" + " test: some unhandled exception\n" + " line: raise \"Oops\"\n" + - " file: test/fixtures/exception.rb +2\n\n" + + " file: #{file} +2\n\n" + "RuntimeError: Oops\n\n" - out = %x{./bin/cutest test/fixtures/exception.rb} + out = %x{./bin/cutest #{file}} assert_equal(expected, out) end test "output of custom assertion" do + file = File.realpath('test/fixtures/fail_custom_assertion.rb') expected = "\n" + " test: failed custom assertion\n" + " line: assert_empty \"foo\"\n" + - " file: test/fixtures/fail_custom_assertion.rb +7\n\n" + + " file: #{file} +7\n\n" + "Cutest::AssertionFailed: not empty\n\n" - out = %x{./bin/cutest test/fixtures/fail_custom_assertion.rb} + out = %x{./bin/cutest #{file}} assert_equal(expected, out) end test "output of failure in nested file" do + test_file = File.realpath('test/fixtures/failure.rb') + nested_file = File.realpath('test/fixtures/failure_in_loaded_file.rb') expected = "\n" + " test: failed assertion\n" + " line: assert false\n" + - " file: test/fixtures/failure.rb +2\n\n" + + " file: #{test_file} +2\n\n" + "Cutest::AssertionFailed: expression returned false\n\n" - out = %x{./bin/cutest test/fixtures/failure_in_loaded_file.rb} + out = %x{./bin/cutest #{nested_file}} assert_equal(expected, out) end debian/patches/series0000644000000000000000000000004112044774315012034 0ustar absolute-filepaths-in-test.patch debian/changelog0000644000000000000000000000035312044776375011060 0ustar ruby-cutest (1.2.0-1) unstable; urgency=low * Initial release. (Closes: #638829) * fix failing tests, patch by srihari * add manpage for cutest. -- Praveen Arimbrathodiyil Mon, 22 Aug 2011 18:29:19 +0530 debian/control0000644000000000000000000000160112044652441010571 0ustar Source: ruby-cutest Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Praveen Arimbrathodiyil DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.8~) Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-cutest.git Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-cutest.git;a=summary Homepage: http://github.com/djanowski/cutest XS-Ruby-Versions: ruby1.9.1 Package: ruby-cutest Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.9.1 Description: Run ruby tests independantly Cutest run tests in separate processes to avoid shared state. Once a failure is found, you get a report detailing what failed and how to locate the error and the rest of the file is skipped. debian/watch0000644000000000000000000000014112044651003010206 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/cutest .*/cutest-(.*).tar.gz debian/manpages0000644000000000000000000000001612044651003010674 0ustar debian/*.[0-9]debian/ruby-tests.rb0000644000000000000000000000015212044651003011625 0ustar ENV['PATH'] = 'debian/ruby-cutest/usr/bin:' + ENV['PATH'] require "cutest" Cutest.run(Dir["test/*.rb"]) debian/source/0000755000000000000000000000000012044651003010461 5ustar debian/source/format0000644000000000000000000000001412044651003011667 0ustar 3.0 (quilt) debian/cutest.1.pod0000644000000000000000000000104412045000070011323 0ustar =head1 NAME cutest - run tests in separate processes =head1 SYNOPSIS B [I