Class: Saki::InstallGenerator

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

Instance Method Summary collapse

Constructor Details

#initialize(args = [], options = {}, config = {}) ⇒ InstallGenerator

Returns a new instance of InstallGenerator.



23
24
25
26
# File 'lib/generators/saki/install_generator.rb', line 23

def initialize(args=[], options={}, config={})
  puts "Defaulting to Capybara..." if options.empty?
  super
end

Instance Method Details

#driverObject



34
35
36
# File 'lib/generators/saki/install_generator.rb', line 34

def driver
  @driver = options.webrat? ? 'webrat' : 'capybara'
end

#manifestObject



28
29
30
31
32
# File 'lib/generators/saki/install_generator.rb', line 28

def manifest
  empty_directory "spec/#{AcceptanceDir}/support"
  template "acceptance_helper.rb", "spec/#{AcceptanceDir}/acceptance_helper.rb"
  copy_file "helpers.rb", "spec/#{AcceptanceDir}/support/helpers.rb"
end