Class: Eastrails::Components::Vcr

Inherits:
Base
  • Object
show all
Defined in:
lib/eastrails/components/vcr.rb

Instance Method Summary collapse

Methods inherited from Base

#component_installed?, #dir_html_to_haml, #do_if_installed, #file_html_to_haml, #gems, #html_to_haml, #parse_gemfile

Methods inherited from Generator

#initialize

Constructor Details

This class inherits a constructor from Eastrails::Generator

Instance Method Details

#addObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/eastrails/components/vcr.rb', line 4

def add
  do_if_installed("cucumber", "rspec") do
    gem "vcr", require: false, group: :test
    gem "webmock", require: false, group: :test

    system 'bundle install'
    do_if_installed("rspec") do
      directory "vcr/spec", "spec"
    end

    do_if_installed("cucumber") do
      directory "vcr/features", "features"
    end
  end
end