Sha256: f5cd05d5f66aac3bac075f66ca6abe5d13a078bbe0fabfb95061911f19c7113d

Contents?: true

Size: 728 Bytes

Versions: 2

Compression:

Stored size: 728 Bytes

Contents

require_relative "./helpers"

describe Spinebox::Compiler do
  
  before(:each) do
    Dir.chdir "#{Spinebox.root}/templates/app"
    Spinebox.boot!
    File.new("app/assets/images/test.png", "w")
  end
  
  after(:each) do
    FileUtils.rm_rf "app/assets/images/test.png"
    FileUtils.rm_rf "public"
  end
  
  it "should compile the assets and views to the public folder" do
    Dir["public/**/*"].should be_empty
    
    Spinebox::Compiler.compile
    
    [
      "public/assets/application.js",
      "public/assets/application.css",
      "public/assets/test.png",
      "public/index.html"
    ].each{ |file| File.exists?(file).should be_true }
    
    File.exists?("public/_partial.html").should be_false
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spinebox-0.0.15 spec/compiler_spec.rb
spinebox-0.0.14 spec/compiler_spec.rb