Sha256: aabf2e3c4f2b928a300aba85a1ebe43a7960a8e270a00a692208a2dd19b84828

Contents?: true

Size: 650 Bytes

Versions: 3

Compression:

Stored size: 650 Bytes

Contents

require "spec_helper"

describe Lam::Build do
  before(:each) do
    FileUtils.rm_f("spec/fixtures/project/handlers/controllers/posts.js")
  end
  let(:build) do
    Lam::Build.new(noop: true)
  end

  describe "Build" do
    it "#handlers" do
      expect(build.handlers).to eq([
        {
          handler: "handlers/controllers/posts.create",
          js_path: "handlers/controllers/posts.js",
          js_method: "create"
        }
      ])
    end

    it "builds handlers javascript files" do
      build.build
      file_exist = File.exist?("#{Lam.root}handlers/controllers/posts.js")
      expect(file_exist).to be true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lam-0.1.2 spec/lib/lam/build_spec.rb
lam-0.1.1 spec/lib/lam/build_spec.rb
lam-0.0.1 spec/lib/lam/build_spec.rb