[DRE-commits] [SCM] ruby-cutest.git branch, master, updated. upstream/1.2.0-28-gb104fc3

Praveen Arimbrathodiyil praveen at debian.org
Sat Nov 3 11:34:23 UTC 2012


The following commit has been merged in the master branch:
commit e8f1761caae6325b7806eabeb3af95a9a4d2e269
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Fri Nov 2 22:27:02 2012 +0530

    patch by Srihari to fix failing tests

diff --git a/debian/patches/absolute-filepaths-in-test.patch b/debian/patches/absolute-filepaths-in-test.patch
new file mode 100644
index 0000000..f92bfff
--- /dev/null
+++ b/debian/patches/absolute-filepaths-in-test.patch
@@ -0,0 +1,81 @@
+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
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0b7346f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+absolute-filepaths-in-test.patch

-- 
ruby-cutest.git



More information about the Pkg-ruby-extras-commits mailing list