class CwTestGen::Generators::Project
Public Class Methods
source_root()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 13 def self.source_root File.dirname(__FILE__) + "/project" end
Public Instance Methods
copy_cucumber_yml()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 21 def copy_cucumber_yml template "cucumber.yml.tt", "#{name}/cucumber.yml" end
copy_env()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 43 def copy_env template "env.rb.tt", "#{name}/features/support/env.rb" end
copy_hooks()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 39 def copy_hooks template "hooks.rb.tt", "#{name}/features/support/hooks.rb" end
copy_page_templates()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 51 def copy_page_templates if gen_page_templates template "clockwork_page.rb.tt", "#{name}/features/support/pages/clockwork_page.rb" template "home_page.rb.tt", "#{name}/features/support/pages/home_page.rb" template "sample_cucumber.feature.tt", "#{name}/features/sample_cucumber.feature" template "sample_steps.rb.tt", "#{name}/features/support/step_definitions/#{name}_steps.rb" end end
create_cucumber_directories()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 25 def create_cucumber_directories empty_directory("#{name}/features") empty_directory("#{name}/features/support") empty_directory("#{name}/features/step_definitions") end
create_log_directory()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 31 def create_log_directory empty_directory("#{name}/features/logs") end
create_pages_directory()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 47 def create_pages_directory empty_directory("#{name}/features/support/pages") end
create_screenshot_directory()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 35 def create_screenshot_directory empty_directory("#{name}/features/screenshots") end
create_symlink_to_lib()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 60 def create_symlink_to_lib if gen_symlink_to_lib if File.symlink?("#{name}/features/support/lib") return nil end if File.directory?("../lib") File.symlink("../../../../lib","#{name}/features/support/lib") end end end
create_top_directory()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 17 def create_top_directory empty_directory(name) end
Private Instance Methods
gen_page_templates()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 74 def gen_page_templates with_page_templates == 'true' end
gen_symlink_to_lib()
click to toggle source
# File lib/cwtestgen/generators/project.rb, line 78 def gen_symlink_to_lib with_lib_symlink == 'true' end