Class: Saki::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Saki::InstallGenerator
- Defined in:
- lib/generators/saki/install_generator.rb
Instance Method Summary collapse
- #driver ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ InstallGenerator
constructor
A new instance of InstallGenerator.
- #manifest ⇒ Object
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=[], ={}, config={}) puts "Defaulting to Capybara..." if .empty? super end |
Instance Method Details
#driver ⇒ Object
34 35 36 |
# File 'lib/generators/saki/install_generator.rb', line 34 def driver @driver = .webrat? ? 'webrat' : 'capybara' end |
#manifest ⇒ Object
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 |