Skip to content

Commit 46efcc2

Browse files
committed
Add spec for RbConfig::TOPDIR
1 parent e99c96a commit 46efcc2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/ruby/library/rbconfig/rbconfig_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,13 @@
2424
end
2525
end
2626
end
27+
28+
describe "RbConfig::TOPDIR" do
29+
it "either returns nil (if not installed) or the prefix" do
30+
if RbConfig::TOPDIR
31+
RbConfig::TOPDIR.should == RbConfig::CONFIG["prefix"]
32+
else
33+
RbConfig::TOPDIR.should == nil
34+
end
35+
end
36+
end

0 commit comments

Comments
 (0)