Sha256: 942ec37ca6da3193560a06a8320bea5371531332d68804e4a00c4c359a44e1a7

Contents?: true

Size: 797 Bytes

Versions: 23

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Bankai
  module Generators
    # :nodoc:
    class TestingGenerator < Base
      def generate_rspec
        generate 'rspec:install'
      end

      def configure_rspec
        remove_file 'spec/rails_helper.rb'
        remove_file 'spec/spec_helper.rb'
        copy_file 'rails_helper.rb', 'spec/rails_helper.rb'
        copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
      end

      def provide_shoulda_matchers_config
        copy_file(
          'spec/shoulda_matchers.rb',
          'spec/support/shoulda_matchers.rb'
        )
      end

      def provide_database_rewinder_config
        copy_file(
          'spec/database_rewinder.rb',
          'spec/support/database_rewinder.rb'
        )
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
bankai-0.13.1 lib/bankai/generators/testing_generator.rb
bankai-0.13.0 lib/bankai/generators/testing_generator.rb
bankai-0.12.1 lib/bankai/generators/testing_generator.rb
bankai-0.12.0 lib/bankai/generators/testing_generator.rb
bankai-0.11.0 lib/bankai/generators/testing_generator.rb
bankai-0.10.0 lib/bankai/generators/testing_generator.rb
bankai-0.9.1 lib/bankai/generators/testing_generator.rb
bankai-0.9.0 lib/bankai/generators/testing_generator.rb
bankai-0.8.1 lib/bankai/generators/testing_generator.rb
bankai-0.8.0 lib/bankai/generators/testing_generator.rb
bankai-0.7.0 lib/bankai/generators/testing_generator.rb
bankai-0.6.0 lib/bankai/generators/testing_generator.rb
bankai-0.5.1 lib/bankai/generators/testing_generator.rb
bankai-0.5.0 lib/bankai/generators/testing_generator.rb
bankai-0.4.1 lib/bankai/generators/testing_generator.rb
bankai-0.4.0 lib/bankai/generators/testing_generator.rb
bankai-0.3.1 lib/bankai/generators/testing_generator.rb
bankai-0.3.0 lib/bankai/generators/testing_generator.rb
bankai-0.2.3 lib/bankai/generators/testing_generator.rb
bankai-0.2.2 lib/bankai/generators/testing_generator.rb