spec/c/handles_spec.rb in therubyracer-0.12.2 vs spec/c/handles_spec.rb in therubyracer-0.12.3
- old
+ new
@@ -1,20 +1,16 @@
require 'spec_helper'
describe "setting up handles scopes" do
- include ExplicitScoper
-
- before do
- def self.instance_eval(*args, &block)
- V8::C::Locker() do
- cxt = V8::C::Context::New()
- begin
- cxt.Enter()
- super(*args, &block)
- ensure
- cxt.Exit()
- end
+ around(:each) do |example|
+ V8::C::Locker() do
+ cxt = V8::C::Context::New()
+ begin
+ cxt.Enter()
+ example.run
+ ensure
+ cxt.Exit()
end
end
end
it "can allocate handle scopes" do
@@ -30,6 +26,6 @@
end
rescue StandardError => e
e.message.should eql "boom!"
end
end
-end
\ No newline at end of file
+end