Sha256: 39b18631658223a5c8a33f28b4488a53538010dd257c1cf760fa926890f37e0c

Contents?: true

Size: 673 Bytes

Versions: 27

Compression:

Stored size: 673 Bytes

Contents

describe 'Opal.loaded' do
  before do
    %w[foo bar baz].each do |module_name|
      `delete Opal.require_table[#{module_name}]`
      `Opal.loaded_features.splice(Opal.loaded_features.indexOf(#{module_name}))`
    end
  end

  it 'it works with multiple paths' do
    `Opal.loaded(['bar'])`
    `(Opal.require_table.foo == null)`.should == true
    `(Opal.require_table.bar === true)`.should == true
    `(Opal.require_table.baz == null)`.should == true

    `Opal.loaded(['foo', 'bar', 'baz'])`
    `(Opal.require_table.foo === true)`.should == true
    `(Opal.require_table.bar === true)`.should == true
    `(Opal.require_table.baz === true)`.should == true
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
opal-1.7.4 spec/opal/core/runtime/loaded_spec.rb
opal-1.7.3 spec/opal/core/runtime/loaded_spec.rb
opal-1.7.2 spec/opal/core/runtime/loaded_spec.rb
opal-1.7.1 spec/opal/core/runtime/loaded_spec.rb
opal-1.7.0 spec/opal/core/runtime/loaded_spec.rb
opal-1.7.0.rc1 spec/opal/core/runtime/loaded_spec.rb
opal-1.6.1 spec/opal/core/runtime/loaded_spec.rb
opal-1.6.0 spec/opal/core/runtime/loaded_spec.rb
opal-1.6.0.rc1 spec/opal/core/runtime/loaded_spec.rb
opal-1.6.0.alpha1 spec/opal/core/runtime/loaded_spec.rb
opal-1.5.1 spec/opal/core/runtime/loaded_spec.rb
opal-1.5.0 spec/opal/core/runtime/loaded_spec.rb
opal-1.5.0.rc1 spec/opal/core/runtime/loaded_spec.rb
opal-1.4.1 spec/opal/core/runtime/loaded_spec.rb
opal-1.4.0 spec/opal/core/runtime/loaded_spec.rb
opal-1.4.0.alpha1 spec/opal/core/runtime/loaded_spec.rb
opal-1.3.2 spec/opal/core/runtime/loaded_spec.rb
opal-1.3.1 spec/opal/core/runtime/loaded_spec.rb
opal-1.3.0 spec/opal/core/runtime/loaded_spec.rb
opal-1.3.0.rc1 spec/opal/core/runtime/loaded_spec.rb