require 'udaeta'

Before do
  rm_rf tmpdir

  @cas = Udaeta::Servers::RubycasServer.new(cas_port, tmpdir)

  @cas.start
  spawned_servers << @cas
end

After do
  stop_spawned_servers
end

require 'udaeta'

AfterConfiguration do
  # It'd be far better to have a way to add certificates to a store having
  # lifetime equal to that of the Cucumber test run.
  OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
end

Before do
  rm_rf tmpdir

  @cas = Udaeta::Servers::RubycasServer.new(cas_port, tmpdir)

  @cas.start
  spawned_servers << @cas
end

After do
  stop_spawned_servers
end

Disable SSL certificate checking in Cucumber scenarios.
Disable SSL certificate checking in Cucumber scenarios.

We're using a self-signed certificate for the CAS proxy callback,
because the CAS protocol mandates that communication with the proxy
callback be done over HTTPS.  Unfortunately, I haven't yet found a way
to set up a certificate store for the lifetime of the Cucumber session;
hence, this gross but working hack.
