Class: Preseason::Recipe::ZeusRspec

Inherits:
Preseason::Recipe show all
Defined in:
lib/preseason/recipe/zeus_rspec.rb

Instance Attribute Summary

Attributes inherited from Preseason::Recipe

#config

Instance Method Summary collapse

Methods inherited from Preseason::Recipe

#initialize, #post_install_hook, #recipe_root

Methods included from Colorize

#ask, #readme, #yes?

Methods included from GeneratorContext

#method_missing

Constructor Details

This class inherits a constructor from Preseason::Recipe

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Preseason::GeneratorContext

Instance Method Details

#configure_zeusObject



7
8
9
10
11
12
13
# File 'lib/preseason/recipe/zeus_rspec.rb', line 7

def configure_zeus
  run 'bundle exec zeus init'

  insert_into_file 'custom_plan.rb', after: "class CustomPlan < Zeus::Rails\n" do
    parse_template('zeus/custom_plan.erb')
  end
end

#create_spec_helperObject



15
16
17
18
19
# File 'lib/preseason/recipe/zeus_rspec.rb', line 15

def create_spec_helper
  remove_file 'spec/spec_helper.rb'
  create_file 'spec/spec_helper.rb', parse_template('spec/spec_helper.erb')
  remove_file 'test'
end

#prepareObject



2
3
4
5
# File 'lib/preseason/recipe/zeus_rspec.rb', line 2

def prepare
  configure_zeus
  create_spec_helper
end