Sha256: 14d9fc2d1cf2682c32d75ccc4426c3d746cd71184cc41236891c5f943d7b1eda

Contents?: true

Size: 518 Bytes

Versions: 3

Compression:

Stored size: 518 Bytes

Contents

require_relative "../lib/jstgenerator"

describe JstGenerator::Underscore do
  jst_path = "spec/fixtures/underscore/jst.js"
  after(:each) do
    File.delete(jst_path) if File.exist?(jst_path)
  end

  it "works for a single file" do
    under = JstGenerator::Underscore.new({
      :dir_glob => "spec/fixtures/underscore/*.us",
      :jst_path => jst_path
    }).generate
    content = IO.read(jst_path)
    expect(content).to eq(<<EOS)
window.JST = {};
window.JST["test"] = _.template("Hello World");
EOS

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jstgenerator-0.1.1 spec/underscore_spec.rb
jstgenerator-0.1.0 spec/underscore_spec.rb
jstgenerator-0.0.1 spec/underscore_spec.rb