Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix availability test for Ruby 1.9 #2

Merged
merged 1 commit into from Dec 1, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions test/unit/test_availability.rb
Expand Up @@ -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