Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created January 9, 2010 22:25
Show Gist options
  • Save BenHall/273149 to your computer and use it in GitHub Desktop.
Save BenHall/273149 to your computer and use it in GitHub Desktop.
Scripts for Cucumber running on IronRuby
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
require 'rubygems'
require 'cucumber/rspec_neuter'
require 'cucumber/cli/main'
begin
# The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
failure = Cucumber::Cli::Main.execute(ARGV.dup)
Kernel.exit(failure ? 1 : 0)
rescue SystemExit => e
Kernel.exit(e.status)
rescue Exception => e
STDERR.puts("#{e.message} (#{e.class})")
STDERR.puts(e.backtrace.join("\n"))
Kernel.exit(1)
end
@echo off
setlocal
set IR_CMD="%~dp0ir.exe"
if defined MERLIN_ROOT (
REM - This is a dev environment. See http://wiki.github.com/ironruby/ironruby
set IR_CMD="%MERLIN_ROOT%\bin\Debug\ir.exe"
)
%IR_CMD% "%~dpn0" %*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment