Skip to content

Instantly share code, notes, and snippets.

@JohnPlummer
JohnPlummer / stop.rb
Created February 23, 2011 11:59
Stop in rails console if something fails in cucumber test. From http://railsdog.com/blog/2011/02/22/cucumber-testing-tips/ (Neeraj Singh)
# Usage:
# @wip @stop
# At the end of features/support/env.rb add the following line
# require File.expand_path(File.dirname(__FILE__) + '/stop')
# $ cucumber -p wip
After do |scenario|
if scenario.failed? && scenario.source_tag_names.include?("@wip") && scenario.source_tag_names.include?("@stop")
puts "Scenario failed. You are in rails console becuase of @stop. Type exit when you are done"
@JohnPlummer
JohnPlummer / .autotest
Created January 18, 2011 13:56
Rails Setup
require "autotest/growl"
require "autotest/fsevent"
Autotest.add_hook :initialize do |autotest|
%w{.git .svn .hg .DS_Store ._* vendor tmp log doc}.each do |exception|
autotest.add_exception(exception)
end
end