Permalink
Browse files

added spec_opts back to RSpec::Core::RakeTask

Closes #75.
  • Loading branch information...
1 parent bb722e4 commit aa6eb8c7df04d86de88bdeb132f4ea1062e2697a @goncalossilva goncalossilva committed with dchelimsky Jul 17, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/rspec/core/rake_task.rb
@@ -18,6 +18,9 @@ class RakeTask < ::Rake::TaskLib
# Glob pattern to match files. (default is 'spec/**/*_spec.rb')
attr_accessor :pattern
+ # Array of commandline options to pass to RSpec. Defaults to [].
+ attr_accessor :spec_opts
+
# The options to pass to ruby. Defaults to blank
attr_accessor :ruby_opts
@@ -46,6 +49,7 @@ def initialize(*args)
@pattern, @rcov_path, @rcov_opts, @ruby_opts = nil, nil, nil, nil
@warning, @rcov = false, false
@fail_on_error = true
+ @spec_opts = []
yield self if block_given?
@rcov_path ||= 'rcov'
@@ -88,6 +92,7 @@ def spec_command
cmd_parts.unshift runner
cmd_parts.unshift bundler
cmd_parts += files_to_run.map { |fn| %["#{fn}"] }
+ cmd_parts << spec_opts.join(" ")
cmd_parts.join(" ")
end
end

0 comments on commit aa6eb8c

Please sign in to comment.