Parent

Class/Module Index [+]

Quicksearch

RSpec::Core::CommandLineConfiguration::Autotest

Public Class Methods

create_dot_rspec_file() click to toggle source
# File lib/rspec/core/command_line_configuration.rb, line 33
def create_dot_rspec_file
  puts "Autotest loads RSpec's Autotest subclass when there is a .rspec file in the project's root directory."
  if File.exist?('./.rspec')
    puts ".rspec file already exists, so nothing was changed."
  else
    FileUtils.touch('./.rspec')
    puts ".rspec file did not exist, so it was created."
  end
end
discover_file_exists?() click to toggle source
# File lib/rspec/core/command_line_configuration.rb, line 51
def discover_file_exists?
  File.exist?(discover_file_path)
end
discover_file_path() click to toggle source
# File lib/rspec/core/command_line_configuration.rb, line 55
def discover_file_path
  File.join('autotest', 'discover.rb')
end
generate() click to toggle source
# File lib/rspec/core/command_line_configuration.rb, line 28
def generate
  create_dot_rspec_file
  remove_autotest_dir_if_present
end
remove_autotest_dir_if_present() click to toggle source
# File lib/rspec/core/command_line_configuration.rb, line 43
def remove_autotest_dir_if_present
  if discover_file_exists?
    print "Delete obsolete autotest/discover.rb [y/n]? "
    exit if gets !~ /y/
    FileUtils.rm_rf(discover_file_path)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.