Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Include Turnip acceptance tests #2

Closed
wants to merge 1 commit into from

1 participant

@oliverbarnes

No description provided.

@oliverbarnes

Hi @marshally , bumping this up in case you didn't see it. Or let me know if it's no good :)

thanks for RRU, btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 18, 2012
  1. @oliverbarnes
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/rspec/rails/uncommitted/tasks/rspec.rake
View
7 lib/rspec/rails/uncommitted/tasks/rspec.rake
@@ -48,13 +48,16 @@ def specs_to_run(changed)
# cribbed from rails/railties/lib/rails/test_unit/testing.rake
models = changed.select { |path| path =~ /app[\\\/]models[\\\/].*\.rb$/ }
controllers = changed.select { |path| path =~ /app[\\\/]controllers[\\\/].*\.rb$/ }
-
+ #Turnip features
+ features = changed.select { |path| path =~ /spec[\\\/]acceptance[\\\/].*\.feature$/ }
+
unit_tests = models.map { |model| "spec/models/#{File.basename(model, '.rb')}_spec.rb" }
functional_tests = controllers.map { |controller| "spec/controllers/#{File.basename(controller, '.rb')}_spec.rb" }
routing_tests = controllers.map { |controller| "spec/routing/#{File.basename(controller, '.rb').gsub("controller", "routing")}_spec.rb" }
+ acceptance_tests = features.map { |feature| "spec/acceptance/#{File.basename(feature)}" }
# Someone who thinks that view testing is awesome should probably write code for handling view specs.
- (unit_tests + functional_tests).uniq.select { |file| File.exist?(file) }
+ (unit_tests + functional_tests + acceptance_tests).uniq.select { |file| File.exist?(file) }
end
namespace :spec do
Something went wrong with that request. Please try again.