Class: Bankai::Generators::TestingGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/bankai/generators/testing_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Base

default_source_root

Instance Method Details

#configure_rspecObject



13
14
15
16
17
18
# File 'lib/bankai/generators/testing_generator.rb', line 13

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

#generate_rspecObject



9
10
11
# File 'lib/bankai/generators/testing_generator.rb', line 9

def generate_rspec
  generate 'rspec:install'
end

#provide_database_rewinder_configObject



27
28
29
30
31
32
# File 'lib/bankai/generators/testing_generator.rb', line 27

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

#provide_shoulda_matchers_configObject



20
21
22
23
24
25
# File 'lib/bankai/generators/testing_generator.rb', line 20

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