Class: Machinist::Generators::InstallGenerator

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#blueprints_fileObject



9
10
11
12
13
14
15
# File 'lib/generators/machinist/install/install_generator.rb', line 9

def blueprints_file
  if rspec?
    copy_file "blueprints.rb", "spec/support/blueprints.rb" 
  else
    copy_file "blueprints.rb", "test/blueprints.rb"
  end
end

#cucumber_supportObject



25
26
27
28
29
# File 'lib/generators/machinist/install/install_generator.rb', line 25

def cucumber_support
  if cucumber?
    template "machinist.rb.erb", "features/support/machinist.rb"
  end
end

#test_helperObject



17
18
19
20
21
22
23
# File 'lib/generators/machinist/install/install_generator.rb', line 17

def test_helper
  if test_unit?
    inject_into_file("test/test_helper.rb", :after => "require 'rails/test_help'\n") do
      "require File.expand_path(File.dirname(__FILE__) + '/blueprints')\n"
    end
  end
end