Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test organization

  • Loading branch information...
commit 7ebc928400dfb52321b8e891fdc007f8ffe9ba12 1 parent 4b0b39b
@arsduo authored
Showing with 56 additions and 6 deletions.
  1. +1 −0  .rspec
  2. +10 −6 Gemfile
  3. +20 −0 Gemfile.lock
  4. +25 −0 Guardfile
View
1  .rspec
@@ -0,0 +1 @@
+--colour --order rand --profile
View
16 Gemfile
@@ -8,10 +8,14 @@ gemspec
# jquery-rails is used by the dummy application
gem "jquery-rails"
-# Declare any dependencies that are still in development here instead of in
-# your gemspec. These might include edge Rails or gems from your path or
-# Git. Remember to move these dependencies to your gemspec before releasing
-# your gem to rubygems.org.
+group :development, :test do
+ # Testing infrastructure
+ gem 'guard'
+ gem 'guard-rspec'
-# To use debugger
-# gem 'debugger'
+ if RUBY_PLATFORM =~ /darwin/
+ # OS X integration
+ gem "ruby_gntp"
+ gem "rb-fsevent"
+ end
+end
View
20 Gemfile.lock
@@ -38,6 +38,12 @@ GEM
builder (3.0.0)
diff-lcs (1.1.3)
erubis (2.7.0)
+ ffi (1.1.4)
+ guard (1.3.0)
+ listen (>= 0.4.2)
+ thor (>= 0.14.6)
+ guard-rspec (1.2.1)
+ guard (>= 1.1)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
@@ -45,6 +51,10 @@ GEM
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.4)
+ 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)
@@ -75,6 +85,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.11.0)
@@ -85,6 +100,7 @@ GEM
rspec-expectations (2.11.2)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
+ ruby_gntp (0.3.4)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
@@ -102,6 +118,10 @@ PLATFORMS
DEPENDENCIES
batch_api!
+ guard
+ guard-rspec
jquery-rails
+ rb-fsevent
rspec
+ ruby_gntp
sqlite3
View
25 Guardfile
@@ -0,0 +1,25 @@
+# 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" }
+
+ # Turnip features and steps
+ watch(%r{^spec/acceptance/(.+)\.feature$})
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+end
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.