Sha256: b3f46e6cf476667c03cd782a5c7e48d2213edd8d27e4a6c242b4ed19841d0b63

Contents?: true

Size: 802 Bytes

Versions: 33

Compression:

Stored size: 802 Bytes

Contents

require 'spec_helper'
require 'rails/generators/less/assets/assets_generator'
require 'rails/generators/less/scaffold/scaffold_generator'

class AssetsGeneratorSpec < Less::Rails::GeneratorSpec
  
  it 'should generate a posts.css.less file' do
    run_generator ['posts']
    assert_file 'app/assets/stylesheets/posts.css.less' do |contents|
      contents.must_match %r{Place all the styles related to the posts controller here}
      contents.must_match %r{You can use Less here}
    end
  end
  
end

class ScaffoldGeneratorSpec < Less::Rails::GeneratorSpec
  
  it 'should parse and copy the scaffold to a less file' do
    run_generator ['posts']
    assert_file 'app/assets/stylesheets/scaffolds.css.less' do |contents|
      contents.must_match %r{background-color: #fff}
    end
  end
  
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
less-rails-5.0.0 test/cases/generators_spec.rb
less-rails-4.0.0 test/cases/generators_spec.rb
less-rails-4.0.0.rc1 test/cases/generators_spec.rb
less-rails-3.0.0 test/cases/generators_spec.rb
less-rails-2.8.0 test/cases/generators_spec.rb
less-rails-2.7.1 test/cases/generators_spec.rb
less-rails-2.7.0 test/cases/generators_spec.rb
less-rails-2.6.0 test/cases/generators_spec.rb
less-rails-2.5.0 test/cases/generators_spec.rb
less-rails-2.4.2 test/cases/generators_spec.rb
less-rails-2.4.1 test/cases/generators_spec.rb
less-rails-2.4.0 test/cases/generators_spec.rb
less-rails-2.3.3 test/cases/generators_spec.rb
less-rails-2.3.2 test/cases/generators_spec.rb
less-rails-2.3.1 test/cases/generators_spec.rb
less-rails-2.3.0 test/cases/generators_spec.rb
less-rails-2.2.6 test/cases/generators_spec.rb
less-rails-2.2.5 test/cases/generators_spec.rb
less-rails-2.2.4 test/cases/generators_spec.rb
less-rails-2.2.3 test/cases/generators_spec.rb