Sha256: a5c7872d4370c25b7e374f5e1b1a10a257de676a2734c1d63b90150f566e2df5

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 KB

Contents

require 'test_helper'
require 'rails/generators/test_case'
require 'rails/generators/concept/concept_generator'

class ConceptGeneratorTest < Rails::Generators::TestCase
  destination File.expand_path('../../tmp', File.dirname(__FILE__))
  setup :prepare_destination
  tests Rails::Generators::ConceptGenerator

  test '[erb] standard assets, show view' do
    run_generator %w(song -e erb)

    assert_file 'app/concepts/song/cell.rb', /class Song::Cell < Cell::Concept/
    assert_file 'app/concepts/song/cell.rb', /def show/
    assert_file 'app/concepts/song/views/show.erb', %r{app/concepts/song/views/show\.erb}
  end

  test '[haml] standard assets, show view' do
    run_generator %w(song -e haml)

    assert_file 'app/concepts/song/cell.rb', /class Song::Cell < Cell::Concept/
    assert_file 'app/concepts/song/cell.rb', /def show/
    assert_file 'app/concepts/song/views/show.haml', %r{app/concepts/song/views/show\.haml}
  end

  test '[slim] standard assets, show view' do
    run_generator %w(song -e slim)

    assert_file 'app/concepts/song/cell.rb', /class Song::Cell < Cell::Concept/
    assert_file 'app/concepts/song/cell.rb', /def show/
    assert_file 'app/concepts/song/views/show.slim', %r{app/concepts/song/views/show\.slim}
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
cells-4.0.0.beta5 test/concept_generator_test.rb
cells-4.0.0.beta4 test/concept_generator_test.rb
cells-4.0.0.beta3 test/concept_generator_test.rb
cells-4.0.0.beta2 test/concept_generator_test.rb
cells-4.0.0.beta1 test/concept_generator_test.rb
cells-jamie-4.0.0.alpha1 test/vm/concept_generator_test.rb