Rake::TaskLib
By default, if there is a Gemfile, the generated command will include 'bundle exec'. Set this to true to ignore the presence of a Gemfile, and not add 'bundle exec' to the command.
default:
false
Use verbose output. If this is set to true, the task will print the executed spec command to stdout.
default:
true
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 115 def initialize(*args) @name = args.shift || :spec @pattern, @rcov_path, @rcov_opts, @ruby_opts, @rspec_opts = nil, nil, nil, nil, nil @warning, @rcov, @skip_bundler = false, false, false @verbose, @fail_on_error = true, true @gemfile = 'Gemfile' yield self if block_given? @rcov_path ||= 'rcov' @rspec_path ||= 'rspec' @pattern ||= './spec/**/*_spec.rb' 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 begin ruby(spec_command) rescue puts failure_message if failure_message raise("ruby #{spec_command} failed") if fail_on_error end end end end 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) RSpec.deprecate('RSpec::Core::RakeTask#spec_opts=', 'rspec_opts=') @rspec_opts = opts end
Generated with the Darkfish Rdoc Generator 2.