Skip to content

Commit

Permalink
Specs for FFI::Platform.mac?, FFI::Platform.unix?
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVartanov committed Dec 9, 2012
1 parent 146bdc0 commit b145e4a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions spec/ruby/optional/ffi/platform_spec.rb
Expand Up @@ -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.