Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ jobs:
bundler-cache: true
- name: Run specs
run: bundle exec rake spec
- name: Run cukes (1)
run: bundle exec cucumber features/01_getting_started_with_aruba/
# - name: Run cukes (2)
# run: bundle exec cucumber features/02_configure_aruba/
# - name: Run cukes (3)
# run: bundle exec cucumber features/03_testing_frameworks/
# - name: Run cukes (4)
# run: bundle exec cucumber features/04_aruba_api/
# - name: Run cukes (5)
# run: bundle exec cucumber features/05_use_rspec_matchers/
# - name: Run cukes (6)
# run: bundle exec cucumber features/06_use_aruba_cli/
# - name: Run cukes (8)
# run: bundle exec cucumber features/08_other/

checks:
runs-on: ubuntu-latest
Expand Down
23 changes: 21 additions & 2 deletions features/01_getting_started_with_aruba/run_commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Run commands with Aruba
Background:
Given I use a fixture named "getting-started-app"

@requires-bash
@requires-bash @unsupported-on-platform-windows
Scenario: Bash Program
Given an executable named "bin/aruba-test-cli" with:
"""bash
Expand Down Expand Up @@ -48,7 +48,7 @@ Feature: Run commands with Aruba
When I successfully run `cucumber`
Then the features should all pass

@requires-ruby
@requires-ruby @unsupported-on-platform-windows
Scenario: Ruby Program
Given an executable named "bin/aruba-test-cli" with:
"""ruby
Expand Down Expand Up @@ -87,3 +87,22 @@ Feature: Run commands with Aruba
"""
When I successfully run `cucumber`
Then the features should all pass

@requires-platform-windows
Scenario: Windows .bat script
Given an executable named "bin/aruba-test-cli.bat" with:
"""
echo "Hello, Aruba!"
"""
Given a file named "features/hello_aruba.feature" with:
"""
Feature: Getting Started With Aruba
Scenario: First Run of Command
Given I successfully run `aruba-test-cli`
Then the output should contain:
\"\"\"
Hello, Aruba!
\"\"\"
"""
When I successfully run `cucumber`
Then the features should all pass
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Feature: Supported Testing Frameworks
"""
$LOAD_PATH.unshift File.expand_path('../test', __FILE__)

require 'test_helper'
require_relative 'test_helper'
require 'minitest/autorun'

class FirstRun < Minitest::Test
Expand Down
12 changes: 12 additions & 0 deletions features/step_definitions/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
skip_this_scenario
end

Before '@requires-bash' do
next unless Aruba.platform.which('bash').nil?

skip_this_scenario
end

Before '@requires-platform-windows' do
next if Cucumber::WINDOWS

skip_this_scenario
end

Before '@requires-posix-standard-tools' do
next unless Aruba.platform.which('printf').nil?

Expand Down
6 changes: 6 additions & 0 deletions fixtures/cli-app/bin/aruba-test-cli.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "./aruba-test-cli" %1 %2 %3 %4 %5%6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*