Permalink
Browse files

Setup to run the tests off of guard and removed all deprication warni…

…ngs that RSpec was giving.
  • Loading branch information...
1 parent 2140f83 commit 00cc4b96856a32901e3252aceee3ba0a2e0aa7a2 @mdeering committed Feb 7, 2012
Showing with 24 additions and 3 deletions.
  1. +3 −1 Gemfile
  2. +19 −0 Guardfile
  3. +2 −2 spec/test_helper.rb
View
@@ -3,6 +3,8 @@ source :rubygems
group :development do
gem 'activesupport'
gem 'actionpack'
+ gem 'guard'
+ gem 'guard-rspec'
gem 'jeweler'
gem 'rspec'
-end
+end
View
@@ -0,0 +1,19 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+end
+
View
@@ -1,11 +1,11 @@
require 'rubygems'
-require 'spec'
+#require 'spec'
require 'active_support'
require 'action_view'
require 'digest/md5'
require 'uri'
-Spec::Runner.configure do |config|
+RSpec.configure do |config|
end
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')

0 comments on commit 00cc4b9

Please sign in to comment.