Class: Test::Right::Generator

Inherits:
Object
  • Object
show all
Includes:
FileUtils
Defined in:
lib/test/right/generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Generator

Returns a new instance of Generator.



8
9
10
# File 'lib/test/right/generator.rb', line 8

def initialize(args)
  @args = args
end

Instance Method Details

#generateObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/test/right/generator.rb', line 12

def generate
  mkdir_p("test/right/features")
  mkdir_p("test/right/widgets")

  open("test/right/config.yml", 'wb') do |file|
    file.write <<-EOF
# The base URL of your staging server
base_url: http://example.com/

# Which browser you want to run your tests in
browser: firefox
    EOF
  end
end