Permalink
Browse files

Guard added to automate the running of the tests

  • Loading branch information...
1 parent 13b61a8 commit 37f415486d1c4dca5fa0f2bf96b29f01416f6f40 @safalmj committed Aug 15, 2012
Showing with 53 additions and 0 deletions.
  1. +5 −0 Gemfile
  2. +24 −0 Gemfile.lock
  3. +24 −0 Guardfile
  4. 0 app/views/layouts/gemfile
View
@@ -8,6 +8,7 @@ gem 'rails', '3.2.6'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.10.0'
+ gem 'guard-rspec', '0.5.5'
end
gem 'json'
@@ -28,6 +29,10 @@ gem 'jquery-rails'
group :test do
gem 'capybara', '1.1.2'
+ gem 'rb-inotify', '0.8.8'
+ gem 'libnotify', '0.5.9'
+ gem 'guard-spork', '0.3.2'
+ gem 'spork', '0.9.0'
end
group :production do
View
@@ -52,15 +52,28 @@ GEM
execjs (1.4.0)
multi_json (~> 1.0)
ffi (1.0.11)
+ guard (1.3.2)
+ listen (>= 0.4.2)
+ thor (>= 0.14.6)
+ guard-rspec (0.5.5)
+ guard (>= 0.8.4)
+ guard-spork (0.3.2)
+ guard (>= 0.8.4)
+ spork (>= 0.8.4)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.4)
+ libnotify (0.5.9)
libwebsocket (0.1.4)
addressable
+ listen (0.4.7)
+ rb-fchange (~> 0.0.5)
+ rb-fsevent (~> 0.9.1)
+ rb-inotify (~> 0.8.8)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -93,6 +106,11 @@ GEM
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
+ rb-fchange (0.0.5)
+ ffi
+ rb-fsevent (0.9.1)
+ rb-inotify (0.8.8)
+ ffi (>= 0.5.0)
rdoc (3.12)
json (~> 1.4)
rspec (2.10.0)
@@ -119,6 +137,7 @@ GEM
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
+ spork (0.9.0)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
@@ -142,11 +161,16 @@ PLATFORMS
DEPENDENCIES
capybara (= 1.1.2)
coffee-rails (~> 3.2.1)
+ guard-rspec (= 0.5.5)
+ guard-spork (= 0.3.2)
jquery-rails
json
+ libnotify (= 0.5.9)
pg (= 0.12.2)
rails (= 3.2.6)
+ rb-inotify (= 0.8.8)
rspec-rails (= 2.10.0)
sass-rails (~> 3.2.3)
+ spork (= 0.9.0)
sqlite3 (= 1.3.5)
uglifier (>= 1.0.3)
View
@@ -0,0 +1,24 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+require 'active_support/core_ext'
+
+
+guard 'rspec', :version => 2, :all_after_pass => false 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{^spec/.+_spec\.rb$})
+ 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{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_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('spec/spec_helper.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
+
No changes.

0 comments on commit 37f4154

Please sign in to comment.