diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-05 00:13:06 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-05 00:13:06 +0200 |
commit | f3d11962e77d25d19a312b4baa1a390539b2187b (patch) | |
tree | d7a3842583a0607cba272a85b210f5947ed9ec57 /spec/eet_spec.rb | |
parent | e4baccaefd209a25daa3ff8d5277fe86aca1d379 (diff) | |
download | ffi-efl-f3d11962e77d25d19a312b4baa1a390539b2187b.zip ffi-efl-f3d11962e77d25d19a312b4baa1a390539b2187b.tar.gz |
all FFI into one module Efl::Native
Diffstat (limited to 'spec/eet_spec.rb')
-rw-r--r-- | spec/eet_spec.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/eet_spec.rb b/spec/eet_spec.rb index 89da878..67f4ed2 100644 --- a/spec/eet_spec.rb +++ b/spec/eet_spec.rb @@ -7,6 +7,7 @@ describe Efl::Eet do # before(:all) { Eet = Efl::Eet + Native = Efl::Native REetFile = Efl::Eet::REetFile } # @@ -31,10 +32,10 @@ describe Efl::Eet do end # it "should have good enums" do - Eet::Native.enum_type(:eet_file_mode)[:eet_file_mode_invalid].should == -1 - Eet::Native.enum_type(:eet_file_mode)[:eet_file_mode_read].should == 0 - Eet::Native.enum_type(:eet_file_mode)[:eet_file_mode_write].should == 1 - Eet::Native.enum_type(:eet_file_mode)[:eet_file_mode_read_write].should == 2 + Native.enum_type(:eet_file_mode)[:eet_file_mode_invalid].should == -1 + Native.enum_type(:eet_file_mode)[:eet_file_mode_read].should == 0 + Native.enum_type(:eet_file_mode)[:eet_file_mode_write].should == 1 + Native.enum_type(:eet_file_mode)[:eet_file_mode_read_write].should == 2 end # describe Efl::Eet::REetFile do @@ -42,15 +43,15 @@ describe Efl::Eet do after(:each) { Eet.shutdown } # it "should open and close" do - f = REetFile.open FP, Eet::Native.enum_type(:eet_file_mode)[:eet_file_mode_write] + f = REetFile.open FP, Native.enum_type(:eet_file_mode)[:eet_file_mode_write] f.write 'fake', 'value' f.close end # it "should be able to get file access mode" do - Eet::Native.enum_type(:eet_file_mode).symbols.each do |m| + Native.enum_type(:eet_file_mode).symbols.each do |m| next if m==:eet_file_mode_invalid - REetFile.open FP, Eet::Native.enum_type(:eet_file_mode)[m] do |f| + REetFile.open FP, Native.enum_type(:eet_file_mode)[m] do |f| f.mode_get.should == m end end |