booth 0.1.6 → 0.1.7

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: 567601ef14e25c620c7d2d8ab39810cb23fac87850f6e960b997674ddc770187
4
- data.tar.gz: dc4edd0a924d9878a3d0759ac28f20a9245012e645e874448bc442079972f1aa
3
+ metadata.gz: 117283879ce936895cf4def7b4d6e7780af5739434078bc91f7c462c6145526a
4
+ data.tar.gz: ad8f7c4d0fcdeba1987d965eb503f68ccf0daac32328c8a1332977191bbc289c
5
5
  SHA512:
6
- metadata.gz: 872fe471556a1d07f9944741ab09aca261dadadfa130eba4b6599610d5ef8fd0db21b09d23a5c55c3e742a8a4286d86bb8dfe335c057d8e89615f6d91d3481ba
7
- data.tar.gz: 305f826130c100261e7d6ec7dd34f2f326e02294ad6beb210f151e0fca1227b812e8c94cd4b9dbf261d536eb1feae6e6a4006d9890409e133fe833387844da56
6
+ metadata.gz: b35328cca811b4a19136a819ab05c0e894cd4fa65d1a6195c8abd96fc49d0fa14894aed1bb746293034728e48ae421a07f758f2734fb9d2b19c13f0ebb1e1c7f
7
+ data.tar.gz: 6a15f32a17273e19164f108ce483a0eea5ebfe5a516a12218a3877c2170b32d2ad6dd4efe73a5988218f48b33b52d8e795dcd7f1a726f629a389dc5539424ee5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # main
2
2
 
3
+ # 0.1.7
4
+
5
+ * Fix time travel actually returning in test suite
6
+
3
7
  # 0.1.6
4
8
 
5
9
  - Remove the unused `domain` option from `Booth::Userland::Webauths::Destroy`. It was mandatory but never read, so `Booth::Userland.destroy_webauth` crashed with `KeyError: option 'domain' is required`
@@ -17,6 +17,28 @@ module Booth
17
17
  option :before_test, default: -> {}
18
18
  option :after_credential, default: -> { ->(credential_id:) {} }
19
19
 
20
+ # Scenarios call `travel`/`travel_to` (non-block form) from their own
21
+ # `call` method. Those stubs are tracked in the scenario instance's own
22
+ # SimpleStubs, but `Calls::ClassMethods#call` discards the instance
23
+ # after running — so nobody would ever call `travel_back`, and the
24
+ # frozen clock would leak into every subsequent test.
25
+ #
26
+ # Each scenario class defines its own `call`, so a `prepend` on this
27
+ # base class would be shadowed. Instead, hook `inherited` to prepend
28
+ # the cleanup onto every scenario subclass as it is defined.
29
+ module TimeTravelCleanup
30
+ def call(...)
31
+ super
32
+ ensure
33
+ travel_back
34
+ end
35
+ end
36
+
37
+ def self.inherited(subclass)
38
+ super
39
+ subclass.prepend(TimeTravelCleanup)
40
+ end
41
+
20
42
  private
21
43
 
22
44
  def virtual_authenticators
data/lib/booth/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Booth
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - halo