Sha256: 4c115cba646c3cc1b58b3e68c876f556b231ffd88105e9c1c8787fdfff0e8dbb

Contents?: true

Size: 962 Bytes

Versions: 8

Compression:

Stored size: 962 Bytes

Contents

require_relative "./helpers"

describe Spinebox::ERBContext do
  
  before(:all) do
    Dir.chdir "#{Spinebox.root}/templates/app"
    Spinebox.boot!
  end
  
  context "javascript" do
    
    it "should offer asset tags concatenated" do
      Spinebox.config.concatenate = true
      javascript_include_tag("application").split("\n").should have(1).tag
    end
  
    it "should offer asset tags unconcatenated" do
      Spinebox.config.concatenate = false
      javascript_include_tag("application").split("\n").should have_at_least(5).tags
    end
    
  end
  
  context "css" do
    
    it "should offer asset tags concatenated" do
      Spinebox.config.concatenate = true
      stylesheet_link_tag("application").split("\n").should have(1).tag
    end
  
    it "should offer asset tags unconcatenated" do
      Spinebox.config.concatenate = false
      stylesheet_link_tag("application").split("\n").should have_at_least(1).tag
    end
    
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spinebox-0.0.13 spec/erb_context_spec.rb
spinebox-0.0.12 spec/erb_context_spec.rb
spinebox-0.0.11 spec/erb_context_spec.rb
spinebox-0.0.10 spec/erb_context_spec.rb
spinebox-0.0.9 spec/erb_context_spec.rb
spinebox-0.0.8 spec/erb_context_spec.rb
spinebox-0.0.7 spec/erb_context_spec.rb
spinebox-0.0.6 spec/erb_context_spec.rb