Sha256: aafc4ee2144f306aed179c150aec93ccfd5a7b6539f42b01044ed46a1da0dbb7

Contents?: true

Size: 512 Bytes

Versions: 14

Compression:

Stored size: 512 Bytes

Contents

require 'generators/rspec'

module Rspec
  module Generators
    # @private
    class SystemGenerator < Base
      class_option :system_specs, type: :boolean, default: true,  desc: "Generate system specs"

      def generate_system_spec
        return unless options[:system_specs]

        template template_name, File.join('spec/system', class_path, filename)
      end

      def template_name
        'system_spec.rb'
      end

      def filename
        "#{table_name}_spec.rb"
      end
    end
  end
end

Version data entries

14 entries across 12 versions & 3 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rspec-rails-5.1.2/lib/generators/rspec/system/system_generator.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rspec-rails-5.1.1/lib/generators/rspec/system/system_generator.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rspec-rails-5.1.2/lib/generators/rspec/system/system_generator.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rspec-rails-5.1.1/lib/generators/rspec/system/system_generator.rb
rspec-rails-5.1.2 lib/generators/rspec/system/system_generator.rb
rspec-rails-6.0.0.rc1 lib/generators/rspec/system/system_generator.rb
rspec-rails-5.1.1 lib/generators/rspec/system/system_generator.rb
rspec-rails-5.1.0 lib/generators/rspec/system/system_generator.rb
rspec-rails-5.0.3 lib/generators/rspec/system/system_generator.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/rspec-rails-5.0.2/lib/generators/rspec/system/system_generator.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/rspec-rails-5.0.2/lib/generators/rspec/system/system_generator.rb
rspec-rails-5.0.2 lib/generators/rspec/system/system_generator.rb
rspec-rails-5.0.1 lib/generators/rspec/system/system_generator.rb
rspec-rails-5.0.0 lib/generators/rspec/system/system_generator.rb