Sha256: 09e0bc8fced7aa5b081b5925f50ca9934b14982d1ac78fd8e549047790fdb8bb

Contents?: true

Size: 400 Bytes

Versions: 37

Compression:

Stored size: 400 Bytes

Contents

require 'spec_helper'

describe V8::Context do
  it "can be disposed of" do
    cxt = V8::Context.new
    cxt.enter do
      cxt['object'] = V8::Object.new
    end
    cxt.dispose()

    lambda {cxt.eval('1 + 1')}.should raise_error
    lambda {cxt['object']}.should raise_error
  end

  it "can be disposed of any number of times" do
    cxt = V8::Context.new
    10.times {cxt.dispose()}
  end
end

Version data entries

37 entries across 37 versions & 8 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/therubyracer-0.12.2/spec/v8/context_spec.rb
therubyracer-0.12.3 spec/v8/context_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/therubyracer-0.11.4/spec/v8/context_spec.rb
therubyracer-xcode-0.12.3 spec/v8/context_spec.rb
therubyracer-xcode-0.12.2 spec/v8/context_spec.rb
therubyracer-tmpfork-0.12.2 spec/v8/context_spec.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/therubyracer-0.12.2/spec/v8/context_spec.rb
therubyracer-0.12.2 spec/v8/context_spec.rb
therubyracer-0.12.1 spec/v8/context_spec.rb
therubyracer-discourse-0.12.0 spec/v8/context_spec.rb
therubyracer-0.12.0 spec/v8/context_spec.rb
therubyracer-0.11.4 spec/v8/context_spec.rb
therubyracer-0.11.3 spec/v8/context_spec.rb
therubyracer-0.11.2 spec/v8/context_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0/spec/v8/context_spec.rb
therubyracer-0.11.1 spec/v8/context_spec.rb
therubyracer-0.11.1beta1 spec/v8/context_spec.rb
therubyracer-0.11.0 spec/v8/context_spec.rb
therubyracer-0.11.0beta8-x86-freebsd-9 spec/v8/context_spec.rb
therubyracer-0.11.0beta8-x86_64-linux spec/v8/context_spec.rb