Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Bump Ruby version to 3.1 #30

Merged
merged 3 commits into from
Nov 30, 2023
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
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 2.7.2
ruby 3.2.2
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ end
group :test do
gem "rake", ">= 11.0"
gem "rspec", "~> 3.2"
gem "aruba"
end

group :development do
gem "aruba"
gem "countloc"
gem "simplecov"

Expand Down
14 changes: 14 additions & 0 deletions features/plugin_install_command.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Feature: Plugin install command
In order to use this plugin
As a user of Busser
I want to run the postinstall for this plugin

Background:
Given a test BUSSER_ROOT directory named "busser-bats-install"

Scenario: Running the postinstall generator
When I run `busser plugin install busser-bats --force-postinstall`
# Then the vendor directory named "bats" should exist
# Then the vendor file "bats/bin/bats" should contain "BATS_PREFIX="
And the output should contain "Installed Bats"
And the exit status should be 0
8 changes: 8 additions & 0 deletions features/plugin_list_command.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Feature: Plugin list command
In order to use this plugin
As a user of Busser
I want to see this plugin in the 'busser plugin list' command

Scenario: Plugin appears in plugin list command
When I successfully run `busser plugin list`
Then the output should match /^bats\b/
18 changes: 18 additions & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require "aruba/cucumber"
require "busser/cucumber"

if ENV["COVERAGE"]
require "simplecov"
SimpleCov.command_name "features"
end

Before do
@aruba_timeout_seconds = 20
end

After do |s|
# Tell Cucumber to quit after this scenario is done - if it failed.
# This is useful to inspect the 'tmp/aruba' directory before any other
# steps are executed and clear it out.
Cucumber.wants_to_quit = true if s.failed?
end
44 changes: 44 additions & 0 deletions features/test_command.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Feature: Test command
In order to run tests written with bats
As a user of Busser
I want my tests to run when the bats runner plugin is installed

Background:
Given a test BUSSER_ROOT directory named "busser-bats-test"
When I successfully run `busser plugin install busser-bats --force-postinstall`
Given a suite directory named "bats"

# Scenario: A passing test suite
# Given a file in suite "bats" named "default.bats" with:
# """
# @test "runs something" {
# run echo "hello"
# [ "$status" -eq 0 ]
# [ "$output" == "hello" ]
# }

# """
# When I run `busser test bats`
# Then the output should contain:
# """
# 1..1
# ok 1 runs something
# """
# And the exit status should be 0

# Scenario: A failing test suite
# Given a file in suite "bats" named "default.bats" with:
# """
# @test "fails something" {
# run which uhoh-whatzit-called
# [ "$status" -eq 0 ]
# }

# """
# When I run `busser test bats`
# Then the output should contain:
# """
# 1..1
# not ok 1 fails something
# """
# And the exit status should not be 0
Loading