Skip to content

Commit

Permalink
Test organization
Browse files Browse the repository at this point in the history
  • Loading branch information
arsduo committed Aug 7, 2012
1 parent 4b0b39b commit 7ebc928
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 6 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--colour --order rand --profile
16 changes: 10 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 20 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,23 @@ 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)
jquery-rails (2.0.2)
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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -102,6 +118,10 @@ PLATFORMS

DEPENDENCIES
batch_api!
guard
guard-rspec
jquery-rails
rb-fsevent
rspec
ruby_gntp
sqlite3
25 changes: 25 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit 7ebc928

Please sign in to comment.