hacketyhack/hackety-hack.com — comment on commit 15625a8da275109cd09d61e28da341062c2197e2
File:  line 0
By justinko:

> Ahhh I didn't know about that! I swear that I used to be able to just override it, did something change?

`RSpec::Core::RakeTask.new` just [creates](https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/rake_task.rb#L126) new rake tasks using the `task` DSL. And, Rake doesn't allow you to "override" tasks, it just creates new ones:

```ruby
task :spec do
puts 'one'
end

task :spec do
puts 'two'
end

# running `rake spec` will output "one" & "two"
```

To overwrite a task, you have get [hacky](http://blog.jayfields.com/2008/02/rake-task-overwriting.html).