Permalink
Browse files

Now that rake tasks are exposed via the railtie, remove all the crap

from the top of the Rakefile that was there in case RSpec wasn't
installed.

Closes #122.
  • Loading branch information...
1 parent c7ae979 commit 4d1d66371c88add105d9ef997150393ba8196a60 @dchelimsky dchelimsky committed Jul 10, 2010
Showing with 6 additions and 31 deletions.
  1. +6 −31 lib/rspec/rails/tasks/rspec.rake
@@ -1,34 +1,9 @@
-begin
- require 'rspec/core'
- require 'rspec/core/rake_task'
- Rake.application.instance_variable_get('@tasks')['default'].prerequisites.delete('test')
- spec_prereq = Rails.root.join('config', 'database.yml').exist? ? "db:test:prepare" : :noop
- task :noop do; end
- task :default => :spec
-rescue MissingSourceFile
- module RSpec
- module Core
- class RakeTask
- def initialize(name)
- task name do
- # if rspec-rails is a configured gem, this will output helpful material and exit ...
- require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
-
- # ... otherwise, do this:
- raise <<-MSG
-
-#{"*" * 80}
-* You are trying to run an rspec rake task defined in
-* #{__FILE__},
-* but rspec can not be found in vendor/gems, vendor/plugins or system gems.
-#{"*" * 80}
-MSG
- end
- end
- end
- end
- end
-end
+require 'rspec/core'
+require 'rspec/core/rake_task'
+Rake.application.instance_variable_get('@tasks')['default'].prerequisites.delete('test')
+spec_prereq = Rails.root.join('config', 'database.yml').exist? ? "db:test:prepare" : :noop
+task :noop do; end
+task :default => :spec
task :stats => "spec:statsetup"

0 comments on commit 4d1d663

Please sign in to comment.