Skip to content

Commit

Permalink
feat: Bump Ruby version to 3.1 (#30)
Browse files Browse the repository at this point in the history
* feat: Bump Ruby version to 3.1

Signed-off-by: Dan Webb <dan.webb@damacus.io>

* feat: Bump Ruby version to 3.1

Signed-off-by: Dan Webb <dan.webb@damacus.io>

---------

Signed-off-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
damacus authored Nov 30, 2023
1 parent bfdd315 commit 948f626
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
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

0 comments on commit 948f626

Please sign in to comment.