Sha256: b9d83cd9ad4b32bc2d76fda7408b3e4dbc08f5f27bbdf34ca6cd1f1ea0547bba

Contents?: true

Size: 1.41 KB

Versions: 3

Compression:

Stored size: 1.41 KB

Contents

require 'spec_helper'

describe 'assets pipeline' do
  it 'includes application.js itself' do
    expect('application.js').to compile_with 'var application_js'
  end

  it 'includes user.js' do
    expect('application.js').to compile_with 'var user_js'
  end

  it 'includes bootstrap.js' do
    expect('application.js').to compile_with 'Bootstrap'
  end

  it 'includes application.css itself' do
    expect('application.css').to compile_with '#application_css'
  end

  it 'includes user.css' do
    expect('application.css').to compile_with '#user_css'
  end

  pending 'one commented example red after migrating to new project name'
#  it 'includes bootstrap.css' do
#    expect('application.css').to compile_with 'Bootstrap'
#    expect('application.css').to compile_with 'Font Awesome'
#  end

  it 'includes fonts' do
    expect('fontawesome-webfont.eot').to be_in_precompile_list
  end

  it 'doesn\'t includes user fonts' do
    expect('userfont.eot').to be_in_precompile_list
  end

  context 'font_awesome disabled' do
    before { BootstrapIt.config.font_awesome = false }
    after { BootstrapIt.config.font_awesome = true }

    it 'doesn\'t include font-awesome.css' do
      expect('application.css').to compile_with 'Bootstrap'
      expect('application.css').to_not compile_with 'Font Awesome'
    end

    it 'includes fonts' do
      expect('glyphicons-halflings-regular.eot').to be_in_precompile_list
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bootstrap_it-0.1.2 spec/assets/assets_spec.rb
bootstrap_it-0.1.1 spec/assets/assets_spec.rb
bootstrap_it-0.1.0 spec/assets/assets_spec.rb