class Rspec::Core::RakeTask
def define # :nodoc:
def define # :nodoc: actual_name = Hash === name ? name.keys.first : name desc("Run Rspec code examples") unless ::Rake.application.last_comment task name do RakeFileUtils.send(:verbose, verbose) do if files_to_run.empty? puts "No examples matching #{pattern} could be found" else cmd_parts = [rcov ? 'rcov' : RUBY] cmd_parts += rcov ? [rcov_opts] : [ruby_opts] cmd_parts << '-Ilib' cmd_parts << '-Ispec' cmd_parts << "-w" if warning cmd_parts += files_to_run.collect { |fn| %["#{fn}"] } cmd = cmd_parts.join(" ") puts cmd if verbose unless system(cmd) STDERR.puts failure_message if failure_message raise("Command #{cmd} failed") if fail_on_error end end end end self end