Class: MochaRails::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- MochaRails::InstallGenerator
- Defined in:
- lib/generators/mocha_rails/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#install ⇒ Object
8 9 10 11 12 13 |
# File 'lib/generators/mocha_rails/install_generator.rb', line 8 def install route "mount MochaRails::Engine => '#{[:mount]}' unless Rails.env.production?" test_dir = Dir.exists?(Rails.root.join "spec") ? "spec" : "test" copy_file 'mocha-suite.js', "#{test_dir}/javascripts/mocha-suite.js" end |