Created
April 30, 2011 03:14
-
-
Save tgraham/949365 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is based on the official RSpec tm-bundle | |
require 'rubygems' | |
ENV['TM_PROJECT_DIRECTORY'] ||= File.dirname(ENV['TM_FILEPATH']) | |
rspec_rails_plugin = File.join(ENV['TM_PROJECT_DIRECTORY'],'vendor','plugins','rspec','lib') | |
if File.exist?(File.join(ENV['TM_PROJECT_DIRECTORY'], 'Gemfile')) | |
require "rubygems" | |
require "bundler" | |
Bundler.setup | |
elsif File.directory?(rspec_rails_plugin) | |
$LOAD_PATH.unshift(rspec_rails_plugin) | |
elsif ENV['TM_RSPEC_HOME'] | |
rspec_lib = File.join(ENV['TM_RSPEC_HOME'], 'lib') | |
unless File.directory?(rspec_lib) | |
raise "TM_RSPEC_HOME points to a bad location: #{ENV['TM_RSPEC_HOME']}" | |
end | |
$LOAD_PATH.unshift(rspec_lib) | |
end | |
begin | |
require 'spec' | |
rescue LoadError | |
require 'rspec/core' | |
end | |
$LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..'))) | |
require "cucumber/mate/feature_helper" | |
require "cucumber/mate/runner" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment