Skip to content

Instantly share code, notes, and snippets.

@chao-xian
Last active September 23, 2016 11:14
Show Gist options
  • Save chao-xian/6956120d94f4838872cbf747ab925981 to your computer and use it in GitHub Desktop.
Save chao-xian/6956120d94f4838872cbf747ab925981 to your computer and use it in GitHub Desktop.
Running tests in different ways
# For adding guard and guard notification
group :development do
gem 'guard'
gem 'guard-minitest'
gem 'terminal-notifier-guard'
gem 'guard-livereload', '~> 2.5', require: false
end
# Run only feature tests
find test -name 'feature*_test.rb' | xargs -t bundle exec ruby -I.:test -e "ARGV.each{|f| require f}"
# Run everything except feature tests
find test -name '*_test.rb' | xargs -t bundle exec ruby -I.:test -e "ARGV.each{|f| require f unless f.include? 'feature'}"
# Run all tests without rake
find test -name '*_test.rb' | xargs -t bundle exec ruby -I.:test -e "ARGV.each{|f| require f}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment