Permalink
Browse files

Specs for FFI::Platform.mac?, FFI::Platform.unix?

  • Loading branch information...
DanielVartanov committed Dec 9, 2012
1 parent 146bdc0 commit b145e4a2fbf45443277bc3e5743cf79a4ed5547e
Showing with 39 additions and 0 deletions.
  1. +39 −0 spec/ruby/optional/ffi/platform_spec.rb
@@ -85,4 +85,43 @@
end
end
+ describe "FFI::Platform.mac?" do
+ platform_is :linux do
+ it "returns false" do
+ FFI::Platform.mac?.should == false
+ end
+ end
+
+ platform_is :windows do
+ it "returns false" do
+ FFI::Platform.mac?.should == false
+ end
+ end
+
+ platform_is :darwin do
+ it "returns true" do
+ FFI::Platform.mac?.should == true
+ end
+ end
+ end
+
+ describe "FFI::Platform.unix?" do
+ platform_is :linux do
+ it "returns true" do
+ FFI::Platform.unix?.should == true
+ end
+ end
+
+ platform_is :windows do
+ it "returns false" do
+ FFI::Platform.unix?.should == false
+ end
+ end
+
+ platform_is :darwin do
+ it "returns true" do
+ FFI::Platform.unix?.should == true
+ end
+ end
+ end
end

0 comments on commit b145e4a

Please sign in to comment.