Sha256: e846ccb46140fcd540fdc0ee50fe928858906dcc4af530c39e09590269f224ec

Contents?: true

Size: 662 Bytes

Versions: 3

Compression:

Stored size: 662 Bytes

Contents

require_relative "./helpers"

describe Spinebox::Compiler do
  
  before(:each) do
    Dir.chdir "#{Spinebox.root}/templates"
    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 }
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spinebox-0.0.5 spec/compiler_spec.rb
spinebox-0.0.4 spec/compiler_spec.rb
spinebox-0.0.3 spec/compiler_spec.rb