foobara-spec-helpers 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f207839e90910b2c1c53b1bcac089bf043e530e172cf6fa4b9b96f28961537b
4
- data.tar.gz: 3448e55b269caf003100f318a856895800a49a337b81daba366c40fb8fcc978b
3
+ metadata.gz: '040411719fc0d56bca3b8eaffe419a8915b4d3edabc2d0b6328f75d33033de4c'
4
+ data.tar.gz: 2547bbf72673c519c40cec9c2fee78cdf2907cb696279d2eb3e8197562a1eb06
5
5
  SHA512:
6
- metadata.gz: a2ac799d80b4726d7c33973060f3e908ff12a283c1d9acf7e3b4f97fd7f0f983c06268e859da7a3a08162602cfdfa59649594fec5a9a48d9963f822fbb6f5577
7
- data.tar.gz: f7520d0fa3ac8bca94972de270a91ed70777dbc3222f17f68339ec7cf8dcb1f62152ea765b83f773d715c0ce905ff9b9ada35ca0121e4ff108f808e7c7bc0209
6
+ metadata.gz: 3b7c9b5b01446e3a365ceb7087f078f222434125a0436a8eb3b5cee6be4a22767f83950d72dd5a0cbf9224f53c4172eb52cd522caaba825a964f24919c8dc154
7
+ data.tar.gz: 6481c108c71bdd66f3487f387218ec0e9bec0a5597acda62eb06a7e06ca8dab9453d8e648bcece7f419708e3c48183cda8e22caf273eb7d2cdfe0abc4668ff6b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.1] - 2026-09-19
2
+
3
+ - Add be_one_of and be_a_boolean matchers
4
+
1
5
  ## [0.1.0] - 2026-02-19
2
6
 
3
7
  - Make sure Foobara::Util is loaded in contexts where we're not relying on Foobara
@@ -1,3 +1,4 @@
1
+ # TODO: Does anything use this??
1
2
  RSpec::Matchers.define :any do |expectation|
2
3
  match do |actual|
3
4
  actual.any? { |item| expectation === item }
@@ -0,0 +1,9 @@
1
+ RSpec::Matchers.define :be_a_boolean do
2
+ match do |actual|
3
+ true.equal?(actual) || false.equal?(actual)
4
+ end
5
+
6
+ failure_message do |actual|
7
+ "expected a boolean (true or false) but got #{actual.inspect}"
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ RSpec::Matchers.define :be_one_of do |*allowed_values|
2
+ match do |actual|
3
+ allowed_values.include?(actual)
4
+ end
5
+
6
+ failure_message do |actual|
7
+ "expected one of #{allowed_values.inspect} but got #{actual}"
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-spec-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -37,6 +37,8 @@ files:
37
37
  - lib/foobara/spec_helpers.rb
38
38
  - lib/foobara/spec_helpers/all.rb
39
39
  - lib/foobara/spec_helpers/any.rb
40
+ - lib/foobara/spec_helpers/be_a_boolean.rb
41
+ - lib/foobara/spec_helpers/be_one_of.rb
40
42
  - lib/foobara/spec_helpers/class.rb
41
43
  - lib/foobara/spec_helpers/expectations.rb
42
44
  - lib/foobara/spec_helpers/stubs.rb
@@ -57,13 +59,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
59
  - - ">="
58
60
  - !ruby/object:Gem::Version
59
61
  version: 3.4.0
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '4.1'
60
65
  required_rubygems_version: !ruby/object:Gem::Requirement
61
66
  requirements:
62
67
  - - ">="
63
68
  - !ruby/object:Gem::Version
64
69
  version: '0'
65
70
  requirements: []
66
- rubygems_version: 3.6.9
71
+ rubygems_version: 4.0.20
67
72
  specification_version: 4
68
73
  summary: Common spec helpers used in various Foobara projects.
69
74
  test_files: []