Sha256: ded4a00a7f0fc03af69af216e8f1426384c7cc10d3d4fb53d3dab4c7de92c790

Contents?: true

Size: 551 Bytes

Versions: 6

Compression:

Stored size: 551 Bytes

Contents

require "spec_helper"

describe Wrapper do

  before(:each) do
    @name = "app"
    @script = 'module.exports = function() {return console.log("log from app!");};'
    @expected_script = 'window.require.define({"app":' +
      'function(exports, require, module){' +
      'module.exports = function() {' +
      'return console.log("log from app!");' +
      '};' +
      ";}});\n"
  end

  describe :wrap do
    it "should wrapped by wrapper" do
      script = Wrapper.wrap(@name, @script)
      script.should eq @expected_script
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
linner-0.2.0 spec/linner/wrapper_spec.rb
linner-0.1.5 spec/linner/wrapper_spec.rb
linner-0.1.4 spec/linner/wrapper_spec.rb
linner-0.1.3 spec/linner/wrapper_spec.rb
linner-0.1.2 spec/linner/wrapper_spec.rb
linner-0.1.1 spec/linner/wrapper_spec.rb