Class: Shoestrap::BddGenerator

Inherits:
BaseGenerator
  • Object
show all
Defined in:
lib/generators/shoestrap/bdd_generator.rb

Instance Method Summary collapse

Methods inherited from BaseGenerator

shoestrap_logger, #source_paths

Instance Method Details

#copy_dotrspecObject

TODO: make force optional and make it an option of cli method?



12
13
14
# File 'lib/generators/shoestrap/bdd_generator.rb', line 12

def copy_dotrspec
  copy_file "dotrspec", ".rspec", force: true
end

#copy_spec_helpersObject



16
17
18
19
20
# File 'lib/generators/shoestrap/bdd_generator.rb', line 16

def copy_spec_helpers
  copy_file "spec_helper.rb", "spec/spec_helper.rb", force: true
  copy_file "fast_spec_helper.rb", "spec/fast_spec_helper.rb", force: true
  copy_file "active_record_spec_helper.rb", "spec/active_record_spec_helper.rb", force: true
end

#init_guard_rspecObject



22
23
24
# File 'lib/generators/shoestrap/bdd_generator.rb', line 22

def init_guard_rspec
  Shell.exec('guard init rspec')
end

#init_guard_springObject



26
27
28
# File 'lib/generators/shoestrap/bdd_generator.rb', line 26

def init_guard_spring
  Shell.exec('guard init spring')
end

#install_rspecObject



7
8
9
# File 'lib/generators/shoestrap/bdd_generator.rb', line 7

def install_rspec
  generate("rspec:install")
end