spec/ci_runner_spec.rb in jasmine-2.99.0 vs spec/ci_runner_spec.rb in jasmine-3.0.0

- old
+ new

@@ -10,10 +10,11 @@ :formatters => [], :host => 'http://foo.bar.com', :port => '1234', :rack_options => 'rack options', :stop_spec_on_expectation_failure => false, + :stop_on_spec_failure => false, :random => false ) end let(:thread_instance) { double(:thread, :abort_on_exception= => nil) } @@ -41,10 +42,11 @@ expect(config).to have_received(:port).with(:ci).at_least(:once) expect(config).not_to have_received(:port).with(:server) expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bthrowFailures=false\b/) + expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bfailFast=false\b/) expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\brandom=false\b/) expect(application_factory).to have_received(:app).with(config) expect(server_factory).to have_received(:new).with('1234', 'my fake app', 'rack options') @@ -93,9 +95,19 @@ ci_runner = Jasmine::CiRunner.new(config, thread: fake_thread, application_factory: application_factory, server_factory: server_factory, outputter: outputter) ci_runner.run expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bthrowFailures=true\b/) + end + + it 'can tell the jasmine page to fail fast' do + allow(config).to receive(:stop_on_spec_failure) { true } + + ci_runner = Jasmine::CiRunner.new(config, thread: fake_thread, application_factory: application_factory, server_factory: server_factory, outputter: outputter) + + ci_runner.run + + expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bfailFast=true\b/) end it 'can tell the jasmine page to randomize' do allow(config).to receive(:random) { true }