Rake::TaskLib
# File lib/rspec/core/rake_task.rb, line 115 def initialize(*args, &task_block) setup_ivars(args) desc "Run RSpec code examples" unless ::Rake.application.last_comment task name, *args do |_, task_args| RakeFileUtils.send(:verbose, verbose) do task_block.call(*[self, task_args].slice(0, task_block.arity)) if task_block run_task verbose end end end
@deprecated Has no effect. The rake task now checks ENV instead.
# File lib/rspec/core/rake_task.rb, line 31 def gemfile=(*) deprecate("RSpec::Core::RakeTask#gemfile=", :replacement => 'ENV["BUNDLE_GEMFILE"]') end
# File lib/rspec/core/rake_task.rb, line 139 def run_task(verbose) command = spec_command begin puts command if verbose success = system(command) rescue puts failure_message if failure_message end abort("#{command} failed") if fail_on_error unless success end
# File lib/rspec/core/rake_task.rb, line 128 def setup_ivars(args) @name = args.shift || :spec @rcov_opts, @ruby_opts, @rspec_opts = nil, nil, nil @warning, @rcov = false, false @verbose, @fail_on_error = true, true @rcov_path = 'rcov' @rspec_path = 'rspec' @pattern = './spec{,/*/**}/*_spec.rb' end
@deprecated Has no effect. The rake task now checks ENV instead.
# File lib/rspec/core/rake_task.rb, line 25 def skip_bundler=(*) deprecate("RSpec::Core::RakeTask#skip_bundler=") end
@deprecated Use rspec_opts instead.
Command line options to pass to rspec.
default:
nil
# File lib/rspec/core/rake_task.rb, line 110 def spec_opts=(opts) deprecate('RSpec::Core::RakeTask#spec_opts=', :replacement => 'rspec_opts=') @rspec_opts = opts end
@deprecated Use ruby_opts="-w" instead.
When true, requests that the specs be run with the warning flag set. e.g. "ruby -w"
default:
false
# File lib/rspec/core/rake_task.rb, line 43 def warning=(true_or_false) deprecate("RSpec::Core::RakeTask#warning=", :replacement => 'ruby_opts="-w"') @warning = true_or_false end
Generated with the Darkfish Rdoc Generator 2.