File: test_blankslate_fix_ruby_1.9

package info (click to toggle)
ruby-builder 3.2.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 248 kB
  • ctags: 288
  • sloc: ruby: 1,980; makefile: 15
file content (22 lines) | stat: -rw-r--r-- 663 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Author: Diego Elio Pettenò <flameeyes@gmail.com>
# Last-Update: Wed Feb 2 14:20:00 2011 +0100
# Description:
#  Skip blankslate tests even when using minitest.
#  .
#  At least with Ruby 1.9.2's minitest, simply defining the suite method is
#  not going to be enough to skip over these tests; instead use the skip
#  method if it's available.
#
--- a/test/test_blankslate.rb
+++ b/test/test_blankslate.rb
@@ -82,6 +82,10 @@ end
 #
 class TestBlankSlate < Test::Unit::TestCase
   def setup
+    if Object::const_defined?(:BasicObject) and respond_to?(:skip)
+      skip "BlankSlate is not used in this environment"
+    end
+
     @bs = BlankSlate.new
   end