Sha256: 1ef9ef926cab4f6bd74938162532590b933256cc04b0ecff73ed9c1b9d068c9e

Contents?: true

Size: 1.08 KB

Versions: 47

Compression:

Stored size: 1.08 KB

Contents

require_relative "spec_helper"

describe CssController, type: :controller do
  before :all do
    cache = Rails.root.join("tmp/cache")
    cache.rmtree if cache.exist?
  end

  def test_file(file)
    if Rails.version.split(".").first.to_i >= 5
      get :test, params: {file: file}
    else
      get :test, file: file
    end
  end

  it "integrates with Rails and Sass" do
    test_file "sass"
    expect(response).to be_successful
    clear_css = response.body.tr("\n", " ").squeeze(" ").strip
    expect(clear_css).to eq "a{-webkit-mask:none;mask:none}"
  end

  if Sprockets::Context.instance_methods.include?(:evaluate)
    it "supports evaluate" do
      test_file "evaluate"
      expect(response).to be_successful
      clear_css = response.body.tr("\n", " ").squeeze(" ").strip
      expect(clear_css).to eq "a { -webkit-mask: none; mask: none }"
    end
  end
end

describe "Rake task" do
  it "shows debug" do
    info = `cd spec/app; bundle exec rake autoprefixer:info`
    expect(info).to match(/Browsers:\n  Chrome: 25\n\n/)
    expect(info).to match(/  transition: webkit/)
  end
end

Version data entries

47 entries across 32 versions & 2 rubygems

Version Path
autoprefixer-rails-9.8.6 spec/rails_spec.rb
autoprefixer-rails-9.8.5 spec/rails_spec.rb
autoprefixer-rails-9.8.4 spec/rails_spec.rb
autoprefixer-rails-9.8.3 spec/rails_spec.rb
autoprefixer-rails-9.8.2 spec/rails_spec.rb
autoprefixer-rails-9.8.1 spec/rails_spec.rb
autoprefixer-rails-9.7.6 spec/rails_spec.rb
autoprefixer-rails-9.7.5 spec/rails_spec.rb
autoprefixer-rails-9.7.4 spec/rails_spec.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/rails_spec.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.5/spec/rails_spec.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.7.3/spec/rails_spec.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.1.1/spec/rails_spec.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.1/spec/rails_spec.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.7.1/spec/rails_spec.rb
autoprefixer-rails-9.7.3 spec/rails_spec.rb
autoprefixer-rails-9.7.2 spec/rails_spec.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.1.1/spec/rails_spec.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.1/spec/rails_spec.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/rails_spec.rb