busser-bats 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.tool-versions +1 -1
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -4
- data/Rakefile +9 -15
- data/busser-bats.gemspec +1 -2
- data/features/plugin_install_command.feature +14 -0
- data/features/plugin_list_command.feature +8 -0
- data/features/support/env.rb +18 -0
- data/features/test_command.feature +44 -0
- data/lib/busser/bats/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 80dd7f4f2a1bdbedde3ed56dd1d06006cf12500493e324aff04f3cc97d6fc847
|
|
4
|
+
data.tar.gz: 624cb79b0320e718ab509df144b17abd454f0d7f98394398f73269577177c64a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04744f07800df27d669bad4cec84c8c5ff2988ae47dcf1a277bf3d57fc1652116c02503311e9c081a9f754456967576c45adc452a7e78ea7c8dc971b73a52164
|
|
7
|
+
data.tar.gz: 65fc095f1ad7197228ae0ea880f5cb03b3963d8ab1a3e1fa10b19adfd5c6596fa0779397ba30ad8594bbce5f7c92c6fa5c0dfbab6b0b85de6fb56aadc971c44c
|
data/.tool-versions
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby 2.
|
|
1
|
+
ruby 3.2.2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# busser-bats Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0](https://github.com/test-kitchen/busser-bats/compare/v0.4.0...v0.5.0) (2023-11-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Bump Ruby version to 3.1 ([#30](https://github.com/test-kitchen/busser-bats/issues/30)) ([948f626](https://github.com/test-kitchen/busser-bats/commit/948f6265ca4a5aa187bf7e76f93dd275b1568b0d))
|
|
9
|
+
* Remove cane ([#32](https://github.com/test-kitchen/busser-bats/issues/32)) ([1bf1bda](https://github.com/test-kitchen/busser-bats/commit/1bf1bda3235445455cec19ee47af3cf3dda667b0))
|
|
10
|
+
|
|
3
11
|
## [0.4.0](https://github.com/test-kitchen/busser-bats/compare/v0.3.0...v0.4.0) (2023-11-30)
|
|
4
12
|
|
|
5
13
|
|
data/Gemfile
CHANGED
|
@@ -11,15 +11,12 @@ end
|
|
|
11
11
|
group :test do
|
|
12
12
|
gem "rake", ">= 11.0"
|
|
13
13
|
gem "rspec", "~> 3.2"
|
|
14
|
+
gem "aruba"
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
group :development do
|
|
17
|
-
gem "aruba"
|
|
18
18
|
gem "countloc"
|
|
19
19
|
gem "simplecov"
|
|
20
|
-
|
|
21
|
-
# gem "finstyle", "1.2.0"
|
|
22
|
-
gem "cane", "2.6.2"
|
|
23
20
|
end
|
|
24
21
|
|
|
25
22
|
group :chefstyle do
|
data/Rakefile
CHANGED
|
@@ -2,27 +2,24 @@ require "bundler/gem_tasks"
|
|
|
2
2
|
require "open-uri"
|
|
3
3
|
|
|
4
4
|
namespace :bats do
|
|
5
|
-
|
|
6
5
|
version = ENV.fetch("BATS_VERSION", "v0.4.0")
|
|
7
6
|
url = "https://github.com/sstephenson/bats/archive/#{version}.tar.gz"
|
|
8
7
|
tarball = "tmp/bats-#{version}.tar.gz"
|
|
9
8
|
vendor = "vendor/bats"
|
|
10
9
|
|
|
11
10
|
desc "Vendors bats #{version} source code into gem codebase"
|
|
12
|
-
task :
|
|
11
|
+
task vendor: "#{vendor}/VERSION.txt"
|
|
13
12
|
|
|
14
13
|
directory File.dirname(tarball)
|
|
15
14
|
directory vendor
|
|
16
15
|
|
|
17
16
|
file tarball => File.dirname(tarball) do |t|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
dst.close
|
|
25
|
-
end
|
|
17
|
+
src = open(url).binmode
|
|
18
|
+
dst = open(t.name, "wb")
|
|
19
|
+
IO.copy_stream(src, dst)
|
|
20
|
+
ensure
|
|
21
|
+
src.close
|
|
22
|
+
dst.close
|
|
26
23
|
end
|
|
27
24
|
|
|
28
25
|
file "#{vendor}/VERSION.txt" => [vendor, tarball] do |t|
|
|
@@ -44,7 +41,7 @@ Cucumber::Rake::Task.new(:features) do |t|
|
|
|
44
41
|
end
|
|
45
42
|
|
|
46
43
|
desc "Run all test suites"
|
|
47
|
-
task :
|
|
44
|
+
task test: [:features]
|
|
48
45
|
|
|
49
46
|
desc "Display LOC stats"
|
|
50
47
|
task :stats do
|
|
@@ -54,7 +51,4 @@ task :stats do
|
|
|
54
51
|
sh "countloc -r features"
|
|
55
52
|
end
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
# task :quality => [:cane, :style, :stats]
|
|
59
|
-
|
|
60
|
-
task :default => [:test, :quality]
|
|
54
|
+
task default: %i{test quality}
|
data/busser-bats.gemspec
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Feature: Plugin install command
|
|
2
|
+
In order to use this plugin
|
|
3
|
+
As a user of Busser
|
|
4
|
+
I want to run the postinstall for this plugin
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-bats-install"
|
|
8
|
+
|
|
9
|
+
Scenario: Running the postinstall generator
|
|
10
|
+
When I run `busser plugin install busser-bats --force-postinstall`
|
|
11
|
+
# Then the vendor directory named "bats" should exist
|
|
12
|
+
# Then the vendor file "bats/bin/bats" should contain "BATS_PREFIX="
|
|
13
|
+
And the output should contain "Installed Bats"
|
|
14
|
+
And the exit status should be 0
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Feature: Plugin list command
|
|
2
|
+
In order to use this plugin
|
|
3
|
+
As a user of Busser
|
|
4
|
+
I want to see this plugin in the 'busser plugin list' command
|
|
5
|
+
|
|
6
|
+
Scenario: Plugin appears in plugin list command
|
|
7
|
+
When I successfully run `busser plugin list`
|
|
8
|
+
Then the output should match /^bats\b/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require "aruba/cucumber"
|
|
2
|
+
require "busser/cucumber"
|
|
3
|
+
|
|
4
|
+
if ENV["COVERAGE"]
|
|
5
|
+
require "simplecov"
|
|
6
|
+
SimpleCov.command_name "features"
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
Before do
|
|
10
|
+
@aruba_timeout_seconds = 20
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
After do |s|
|
|
14
|
+
# Tell Cucumber to quit after this scenario is done - if it failed.
|
|
15
|
+
# This is useful to inspect the 'tmp/aruba' directory before any other
|
|
16
|
+
# steps are executed and clear it out.
|
|
17
|
+
Cucumber.wants_to_quit = true if s.failed?
|
|
18
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Feature: Test command
|
|
2
|
+
In order to run tests written with bats
|
|
3
|
+
As a user of Busser
|
|
4
|
+
I want my tests to run when the bats runner plugin is installed
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-bats-test"
|
|
8
|
+
When I successfully run `busser plugin install busser-bats --force-postinstall`
|
|
9
|
+
Given a suite directory named "bats"
|
|
10
|
+
|
|
11
|
+
# Scenario: A passing test suite
|
|
12
|
+
# Given a file in suite "bats" named "default.bats" with:
|
|
13
|
+
# """
|
|
14
|
+
# @test "runs something" {
|
|
15
|
+
# run echo "hello"
|
|
16
|
+
# [ "$status" -eq 0 ]
|
|
17
|
+
# [ "$output" == "hello" ]
|
|
18
|
+
# }
|
|
19
|
+
|
|
20
|
+
# """
|
|
21
|
+
# When I run `busser test bats`
|
|
22
|
+
# Then the output should contain:
|
|
23
|
+
# """
|
|
24
|
+
# 1..1
|
|
25
|
+
# ok 1 runs something
|
|
26
|
+
# """
|
|
27
|
+
# And the exit status should be 0
|
|
28
|
+
|
|
29
|
+
# Scenario: A failing test suite
|
|
30
|
+
# Given a file in suite "bats" named "default.bats" with:
|
|
31
|
+
# """
|
|
32
|
+
# @test "fails something" {
|
|
33
|
+
# run which uhoh-whatzit-called
|
|
34
|
+
# [ "$status" -eq 0 ]
|
|
35
|
+
# }
|
|
36
|
+
|
|
37
|
+
# """
|
|
38
|
+
# When I run `busser test bats`
|
|
39
|
+
# Then the output should contain:
|
|
40
|
+
# """
|
|
41
|
+
# 1..1
|
|
42
|
+
# not ok 1 fails something
|
|
43
|
+
# """
|
|
44
|
+
# And the exit status should not be 0
|
data/lib/busser/bats/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: busser-bats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fletcher Nichol
|
|
@@ -51,6 +51,10 @@ files:
|
|
|
51
51
|
- config/features/plugin_list_command.feature
|
|
52
52
|
- config/features/support/env.rb
|
|
53
53
|
- config/features/test_command.feature
|
|
54
|
+
- features/plugin_install_command.feature
|
|
55
|
+
- features/plugin_list_command.feature
|
|
56
|
+
- features/support/env.rb
|
|
57
|
+
- features/test_command.feature
|
|
54
58
|
- lib/busser/bats/version.rb
|
|
55
59
|
- lib/busser/runner_plugin/bats.rb
|
|
56
60
|
- renovate.json
|
|
@@ -96,4 +100,8 @@ rubygems_version: 3.4.10
|
|
|
96
100
|
signing_key:
|
|
97
101
|
specification_version: 4
|
|
98
102
|
summary: A Busser runner plugin for Bats
|
|
99
|
-
test_files:
|
|
103
|
+
test_files:
|
|
104
|
+
- features/plugin_install_command.feature
|
|
105
|
+
- features/plugin_list_command.feature
|
|
106
|
+
- features/support/env.rb
|
|
107
|
+
- features/test_command.feature
|