aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/etc/confstr_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/etc/confstr_spec.rb')
-rw-r--r--spec/ruby/library/etc/confstr_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/ruby/library/etc/confstr_spec.rb b/spec/ruby/library/etc/confstr_spec.rb
new file mode 100644
index 0000000000..0c922a3a77
--- /dev/null
+++ b/spec/ruby/library/etc/confstr_spec.rb
@@ -0,0 +1,14 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require 'etc'
+
+platform_is_not :windows do
+ describe "Etc.confstr" do
+ it "returns a String for Etc::CS_PATH" do
+ Etc.confstr(Etc::CS_PATH).should be_an_instance_of(String)
+ end
+
+ it "raises Errno::EINVAL for unknown configuration variables" do
+ -> { Etc.confstr(-1) }.should raise_error(Errno::EINVAL)
+ end
+ end
+end