Sha256: bfe2bfb7580ab371c9764f081f81f1ae05494a1138a4e4318970d4667505e14d

Contents?: true

Size: 1.07 KB

Versions: 78

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe "Stylesheets" do
  if Rails.version[0..2] == '3.1'
    require "sprockets"
    context "when Rails 3.1.x" do
      let(:css) do
        assets = Rails.application.assets
        assets.find_asset("active_admin.css")
      end
      it "should successfully render the scss stylesheets using sprockets" do
        css.should_not be_nil
      end
      it "should not have any syntax errors" do
        css.to_s.should_not include("Syntax error:")
      end
    end
  end

  if Rails.version[0..2] == '3.0'
    context "when Rails 3.0.x" do
      let(:stylesheet_path) do
        Rails.root + 'public/stylesheets/active_admin.css'
      end

      before do
        "rm #{stylesheet_path}" if File.exists?(stylesheet_path)
        Sass::Plugin.force_update_stylesheets
      end

      it "should render the scss stylesheets using SASS" do
        File.exists?(stylesheet_path).should be_true
      end

      it "should not have any syntax errors" do
        css = File.read(stylesheet_path)
        css.should_not include("Syntax error:")
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 6 rubygems

Version Path
activeadmin-0.6.6 spec/integration/stylesheets_spec.rb
activeadmin-0.6.5 spec/integration/stylesheets_spec.rb
activeadmin-0.6.4 spec/integration/stylesheets_spec.rb
yousty-activeadmin-1.0.4.pre spec/integration/stylesheets_spec.rb
yousty-activeadmin-1.0.3.pre spec/integration/stylesheets_spec.rb
yousty-activeadmin-1.0.2.pre spec/integration/stylesheets_spec.rb
activeadmin-0.6.3 spec/integration/stylesheets_spec.rb
yousty-activeadmin-1.0.1.pre spec/integration/stylesheets_spec.rb
yousty-activeadmin-1.0.0.pre spec/integration/stylesheets_spec.rb
activeadmin-0.6.2 spec/integration/stylesheets_spec.rb
activeadmin-0.6.1 spec/integration/stylesheets_spec.rb
aa-rails4-0.6.0 spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.141 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/spec/integration/stylesheets_spec.rb