Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix availability test for Ruby 1.9 #2

Merged
merged 1 commit into from

2 participants

Slavek Kabrda Michael Dungan
Slavek Kabrda

No description provided.

Michael Dungan xxx merged commit b91d301 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 1, 2011
  1. Slavek Kabrda
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 4 deletions.
  1. +12 −4 test/unit/test_availability.rb
16 test/unit/test_availability.rb
View
@@ -136,9 +136,17 @@ def test_default_compiler_should_be_from_rbconfig
end
def test_default_include_dir_should_be_from_rbconfig
- expected = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
- Config::CONFIG['sitelibdir'], "."]
-
+ # Ruby 1.9
+ if Config::CONFIG['rubyhdrdir']
+ # Have to add exactly what is in the availiability.rb for Ruby 1.9, since
+ # there is no special RbConfig::CONFIG field for that
+ expected = [RbConfig::CONFIG['includedir'], Config::CONFIG['rubyhdrdir'] +
+ "/" + Config::CONFIG['arch'], RbConfig::CONFIG["archdir"],
+ RbConfig::CONFIG['sitelibdir'], "."]
+ else
+ expected = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
+ Config::CONFIG['sitelibdir'], "."]
+ end
assert_equal expected, @avail.send(:instance_variable_get, :@includes)
end
-end
+end
Something went wrong with that request. Please try again.