Class: WatchDoge::WatchDogeGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/watchdoge/rails/generator.rb

Instance Method Summary collapse

Instance Method Details

#create_watchdoge_fileObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/watchdoge/rails/generator.rb', line 7

def create_watchdoge_file
  configuration = WatchDoge.configuration
  empty_directory "#{configuration.cookie_pool}"

  create_file "#{configuration.regression_dir}/scenarios/#{secenario}.rb", <<~DSL
    # use :chrome

    # compare 'some url'
    # compare 'some url', with: 'some'

    # sign_in_as 'resource' do
    #   compare 'some url', with: 'test'
    # end
    #
  DSL

  empty_directory "#{configuration.regression_dir}/reference/#{secenario}"
end