Class: Pah::Templates::Rspec

Inherits:
Pah::Template
  • Object
show all
Defined in:
lib/pah/templates/rspec.rb

Instance Method Summary collapse

Methods inherited from Pah::Template

#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/pah/templates/rspec.rb', line 4

def call
  copy_static_file 'spec/spec_helper.rb'
  copy_static_file 'spec/rails_helper.rb'

  %w(
    database_cleaner.rb
    factory_girl.rb
    suppress_log.rb
    vcr.rb
    random_timezone.rb
  ).each do |component|
    copy_static_file "spec/support/#{component}"
  end

  git add: 'spec'
  git_commit 'Add RSpec support files'
end