Sha256: 121f03f342968d1432a4fb02c852233cf9d81186fe24abcb5e82397b342a88bd

Contents?: true

Size: 297 Bytes

Versions: 6

Compression:

Stored size: 297 Bytes

Contents

# backtick_javascript: true

require 'native'

describe "Module#native_module" do
  module SomeModule
  end

  after {`delete Opal.global.SomeModule`}

  it "adds current constant to the global JS object" do
    SomeModule.native_module
    `Opal.global.SomeModule`.should == SomeModule
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 spec/opal/stdlib/native/native_module_spec.rb
opal-1.8.2 spec/opal/stdlib/native/native_module_spec.rb
opal-1.8.1 spec/opal/stdlib/native/native_module_spec.rb
opal-1.8.0 spec/opal/stdlib/native/native_module_spec.rb
opal-1.8.0.beta1 spec/opal/stdlib/native/native_module_spec.rb
opal-1.8.0.alpha1 spec/opal/stdlib/native/native_module_spec.rb