Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 4d1d66371c88add105d9ef997150393ba8196a60 1 parent c7ae979
@dchelimsky dchelimsky authored
Showing with 6 additions and 31 deletions.
  1. +6 −31 lib/rspec/rails/tasks/rspec.rake
View
37 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"
Please sign in to comment.
Something went wrong with that request. Please try again.