Skip to content

Instantly share code, notes, and snippets.

@aledalgrande
Created December 15, 2011 14:47
Show Gist options
  • Save aledalgrande/1481341 to your computer and use it in GitHub Desktop.
Save aledalgrande/1481341 to your computer and use it in GitHub Desktop.
My culerity conf
# env.rb
require 'bbc-cucumber-steps'
require 'capybara/cucumber'
require 'culerity'
require 'capybara/culerity'
require 'ruby-debug'
Culerity.jruby_invocation = File.expand_path("~/.rvm/bin/celerity_jruby")
Capybara.register_driver :culerity do |app|
Capybara::Driver::Culerity.new(app)
end
Capybara.javascript_driver = :culerity
# culerity-hooks.rb
Before("@culerity,@celerity,@javascript") do |scenario|
unless @original_path && @rvm_jruby_path
@original_path = ENV['PATH']
@rvm_jruby_path = "#{`dirname "$(readlink "$(which celerity_jruby)")"`.strip}:"
end
ENV['PATH'] = @rvm_jruby_path
end
After("@culerity,@celerity,@javascript") do |scenario|
ENV["PATH"] = @original_path
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment