Skip to content

Commit

Permalink
Merge pull request #85 from dnagir/tdd
Browse files Browse the repository at this point in the history
Make it easier to run specs
  • Loading branch information
andreasronge committed Dec 10, 2011
2 parents 20c8be1 + 9f96a29 commit 1f9930f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--tty
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ group 'test' do
gem "horo", ">= 1.0.2"
gem "rspec", "= 2.6.0"

gem 'guard'
gem 'ruby_gntp', :require => false # GrowlNotify for Mac
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
gem 'rb-fchange', :require => false
gem "guard-rspec"

# use this version for rspec-rails-matchers which work with latest RSpec (Rspec => RSpec)
gem "rspec-rails-matchers", :git => 'git://github.com/afcapel/rspec-rails-matchers.git'

Expand Down
14 changes: 14 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'rspec', :version => 2, :cli => '--tag focus' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }

watch(%r{^spec/.+_spec\.rb$})

watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch(%r{^spec/fixtures/(.+)\.rb$}) { "spec" }
end

8 changes: 8 additions & 0 deletions spec/support/rspec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# In RSpec 3, these symbols will be treated as metadata keys with
# a value of `true`. To get this behavior now (and prevent this
# warning), you can set a configuration option:

RSpec.configure do |c|
c.treat_symbols_as_metadata_keys_with_true_values = true
c.run_all_when_everything_filtered = true
end

0 comments on commit 1f9930f

Please sign in to comment.