Sha256: 6685b68a6ef366fe5ec8415aae7a25f4614fac14f95f839bda9567b7e5f49d15

Contents?: true

Size: 419 Bytes

Versions: 9

Compression:

Stored size: 419 Bytes

Contents

require 'generators/cells/base'

module Rspec
  module Generators
    class CellGenerator < ::Cells::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      def cell_name
        class_path.empty? ? ":#{file_path}" : %{"#{file_path}"}
      end

      def create_cell_spec_file
        template "cell_spec.erb", File.join("spec/cells/#{file_path}_cell_spec.rb")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rspec-cells-0.2.0 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.12 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.11 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.10 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.9 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.8 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.7 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.6 lib/generators/rspec/cell_generator.rb
rspec-cells-0.1.5 lib/generators/rspec/cell_generator.rb