summaryrefslogtreecommitdiffstats
path: root/spec/eet_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/eet_spec.rb')
-rw-r--r--spec/eet_spec.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/eet_spec.rb b/spec/eet_spec.rb
index f332c9b..c12cbb9 100644
--- a/spec/eet_spec.rb
+++ b/spec/eet_spec.rb
@@ -5,24 +5,28 @@ require 'efl/eet'
#
describe "Efl::Eet #{Efl::Eet.version.full}" do
#
- before(:all) {
+ before(:all) do
Eet = Efl::Eet
Native = Efl::Native unless Kernel.const_defined? 'Native'
REetFile = Efl::Eet::REetFile
- }
+ @init = Eet.init
+ end
+ after(:all) do
+ Eet.shutdown
+ end
#
FP = '/tmp/_eet.cfg'
#
it "should init" do
- Eet.init.should == 1
- Eet.init.should == 2
- Eet.init.should == 3
+ Eet.init.should == @init+1
+ Eet.init.should == @init+2
+ Eet.init.should == @init+3
end
#
it "should shutdown" do
- Eet.shutdown.should == 2
- Eet.shutdown.should == 1
- Eet.shutdown.should == 0
+ Eet.shutdown.should == @init+2
+ Eet.shutdown.should == @init+1
+ Eet.shutdown.should == @init
end
#
it "should clearcache" do
@@ -39,8 +43,6 @@ describe "Efl::Eet #{Efl::Eet.version.full}" do
end
#
describe Efl::Eet::REetFile do
- before(:all) { Eet.init.should==1 }
- after(:all) { Eet.shutdown.should==0 }
#
it "should open and close" do
f = REetFile.open FP, Native.enum_type(:eet_file_mode)[:eet_file_mode_write]