Class: Jinda::Generators::RspecGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/jinda/rspec_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



4
5
6
# File 'lib/generators/jinda/rspec_generator.rb', line 4

def self.source_root
  File.dirname(__FILE__) + "/templates"
end

Instance Method Details

#finishObject



20
21
22
23
24
25
26
# File 'lib/generators/jinda/rspec_generator.rb', line 20

def finish 
  puts "      Finish generate rspec:install.\n"
  puts "      To start guard run:\n"
  puts "-----------------------------------------\n"
  puts "guard \n"
  puts "-----------------------------------------\n"
end

#gen_rspecObject



9
10
11
12
13
14
15
16
17
# File 'lib/generators/jinda/rspec_generator.rb', line 9

def gen_rspec
  # generate "rspec:install"
  # empty_directory "spec/support" 
  # empty_directory "spec/model"
  # empty_directory "spec/routing"
  # copy_file ".rspec", ".rspec.bak"
  run "guard init"
  copy_file "dotrspec",".rspec"
end