class WatirInstall::Generators::Test

Public Class Methods

source_root() click to toggle source
# File lib/watir_install/generators/test.rb, line 14
def self.source_root
  "#{File.dirname(__FILE__)}/tests"
end

Public Instance Methods

data_files() click to toggle source
# File lib/watir_install/generators/test.rb, line 26
def data_files
  file = "#{Dir.pwd}/spec/#{klass.downcase}_spec.rb"
  erb = form == 'true' ? "crud" : "spec"
  template "spec/#{erb}.rb.tt", file
  @git.add(file) if @git
end
git() click to toggle source
# File lib/watir_install/generators/test.rb, line 18
def git
  @git = Git.open('./') if Dir.entries('./').include?('.git')
end
name() click to toggle source
# File lib/watir_install/generators/test.rb, line 22
def name
  Dir.pwd[/[^\/]*$/]
end