Getting selenium working with jruby/sinatra/cucumber/webrat on windows

I am trying to run cucumber/webrat with Sinatra on Jruby 1.7.3 (1.9.3)
on
Windows.
It seems to work ok, but when I try to add selenium to webrat. I get the
error shown below.
It seems like it thinks it is in a linux environment or something as the
error happens when it tries to start selenium server and there is a “&”
at
the end of the argument chain. I took a look at capybara but had some
other
similar incomprehensible problem there where the stack dump seemed to go
on
for ever until it ran out of memory. I just want a way to test the
javascript aspects of the sinatra server content.

features/support/env.rb

ENV['RACK_ENV'] = 'test'

require 'rubygems'
require 'rack/test'
require 'rspec/expectations'
require 'webrat'
require "selenium/client"

require File.join(File.dirname(__FILE__), '../../', 'main.rb')


Webrat.configure do |config|
# config.mode = :rack
  config.mode = :selenium
  config.application_port = 4567
  config.application_framework = :sinatra
end

class WebratMixinExample
  include Rack::Test::Methods
  include Webrat::Methods
  include Webrat::Matchers

  Webrat::Methods.delegate_to_session :response_code, :response_body

  def app
    # Sinatra::Application
    Main
  end
end

World{WebratMixinExample.new}

====================================

When I run cucumber I get

unrecognized argument &:
Usage: java -jar selenium-server.jar [-interactive] [options]

-port : the port number the selenium server should use
(default 4444)
-timeout : an integer number of seconds before we should give
up
-interactive: puts you into interactive mode. See the tutorial for
more details

Exception: java.lang.ThreadDeath thrown from the
UncaughtExceptionHandler
in thr
ead “Thread-8”
←[31mGiven I am viewing the admin page←[90m #
features/simple_example.rb:6←[
0m←[0m
←[31m Error while running >>java -jar
“c:/jruby-1.7.3/lib/ruby/gems/shared/
gems/webrat-0.7.3/vendor/selenium-server.jar” -port 4444 -timeout 5 &<<
(Runtime
Error)←[0m

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs