Sha256: ced15529f9fc7318b38c18062b432839a3e3b99200195a95289c1395ac64e145

Contents?: true

Size: 536 Bytes

Versions: 28

Compression:

Stored size: 536 Bytes

Contents

require 'rails/generators/test_unit'

module TestUnit # :nodoc:
  module Generators # :nodoc:
    class ConceptGenerator < Base # :nodoc:
      source_root File.expand_path('../templates', __FILE__)
      argument :actions, type: :array, default: []
      check_class_collision suffix: 'ConceptTest'

      def create_test_file
        template 'unit_test.rb.erb', File.join('test/concepts', class_path, file_name, 'cell_test.rb')
      end

      private

      def states
        (['show'] + actions).uniq
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
cells-rails-0.1.6 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.1.5 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.1.4 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.1.3 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.1.2 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.1.1 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.1.0 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.9 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.8 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.7 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.6 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.5 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.4 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-rails-0.0.3 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-4.0.5 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-4.0.4 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-4.0.3 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-4.0.2 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-4.0.1 lib/rails/generators/test_unit/concept/concept_generator.rb
cells-4.0.0 lib/rails/generators/test_unit/concept/concept_generator.rb