Skip to content
Browse files

Moved test opts to Rakefile and cucumber.yml

  • Loading branch information...
1 parent 3660019 commit c082b170ebeb7dab2093611c9a30139e5a0339dd @ryansch ryansch committed Dec 17, 2011
Showing with 17 additions and 10 deletions.
  1. +0 −2 .rspec
  2. +6 −5 Guardfile
  3. +9 −3 Rakefile
  4. +2 −0 cucumber.yml
View
2 .rspec
@@ -1,2 +0,0 @@
---color
---format progress
View
11 Guardfile
@@ -3,14 +3,15 @@ guard 'bundler' do
watch(/^.+\.gemspec/)
end
+guard 'rspec', :version => 2, :cli => "-c --format progress", :all_on_start => false do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+end
+
guard 'cucumber', :all_on_start => false do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
-guard 'rspec', :version => 2, :cli => "-c -d --format progress", :all_on_start => false do
- watch(%r{^spec/.+_spec\.rb$})
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
- watch('spec/spec_helper.rb') { "spec" }
-end
View
12 Rakefile
@@ -1,10 +1,16 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'rspec/core/rake_task'
+require 'cucumber'
+require 'cucumber/rake/task'
RSpec::Core::RakeTask.new(:spec) do |t|
- # Define options in .rspec so they run with guard as well
-# t.rspec_opts = ["-c"]
+ t.rspec_opts = ["-c", "--format progress"]
end
-task :default => :spec
+Cucumber::Rake::Task.new(:features) do |t|
+end
+
+task :all_tests => [:spec, :features]
+
+task :default => :all_tests
View
2 cucumber.yml
@@ -0,0 +1,2 @@
+---
+default: --color --format progress --strict

0 comments on commit c082b17

Please sign in to comment.
Something went wrong with that request. Please try again.