summaryrefslogtreecommitdiffstats
path: root/spec/eet_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-08-18 10:22:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-08-18 10:22:55 +0200
commit8e9d5ca59eaef7e977857ebe39c086c966c556dd (patch)
tree48dac00564ff18f5ac66069f3b4fc87dfb6b3a65 /spec/eet_spec.rb
parent8ceeda9e767e3be64bcc2b41cc89e1cee3411e82 (diff)
downloadffi-efl-8e9d5ca59eaef7e977857ebe39c086c966c556dd.zip
ffi-efl-8e9d5ca59eaef7e977857ebe39c086c966c556dd.tar.gz
cleanup init/shutdown specs
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]