From d8284a034051358a33866da532348a2890eabab5 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Fri, 15 Nov 2024 16:47:08 +0100 Subject: [PATCH] WIP: Fix 02_config and help with testing --- features/02_configure_aruba/basics.feature | 2 +- features/support/env.rb | 4 ++++ lib/aruba/cucumber/testing_frameworks.rb | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/features/02_configure_aruba/basics.feature b/features/02_configure_aruba/basics.feature index a119440bb..6d98055e7 100644 --- a/features/02_configure_aruba/basics.feature +++ b/features/02_configure_aruba/basics.feature @@ -37,7 +37,7 @@ Feature: Usage of configuration end context 'when slow command' do - before { run_command('aruba-test-cli 1') } + before { run_command('aruba-test-cli 1.4') } it { expect(last_command_started).not_to be_successfully_executed } end end diff --git a/features/support/env.rb b/features/support/env.rb index e918fc8d0..888b8f1b7 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -14,6 +14,10 @@ require 'aruba/config/jruby' require 'rspec/expectations' +Aruba.configure do |config| + config.activate_announcer_on_command_failure = %i[stderr stdout command] +end + Before do |test_case| command_name = "#{test_case.location.file}:#{test_case.location.line} # #{test_case.name}" diff --git a/lib/aruba/cucumber/testing_frameworks.rb b/lib/aruba/cucumber/testing_frameworks.rb index 5016893f9..6dad39840 100644 --- a/lib/aruba/cucumber/testing_frameworks.rb +++ b/lib/aruba/cucumber/testing_frameworks.rb @@ -52,8 +52,10 @@ # RSpec Then(/^the spec(?:s)? should all pass$/) do - step 'the output should contain "0 failures"' - step 'the exit status should be 0' + aggregate_failures do + expect(all_output).to include_output_string ' 0 failures' + expect(last_command_stopped).to have_exit_status 0 + end end # RSpec