Class: Evilution::Integration::RSpec::StateGuard::WorldExampleGroups Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/integration/rspec/state_guard/world_example_groups.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#release(before) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
17
18
19
# File 'lib/evilution/integration/rspec/state_guard/world_example_groups.rb', line 12

def release(before)
  return unless before

  groups = Evilution::Integration::RSpec::StateGuard::Internals.world_ivar(:@example_groups)
  return unless groups

  groups.select! { |g| before.include?(g) }
end

#snapshotObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
10
# File 'lib/evilution/integration/rspec/state_guard/world_example_groups.rb', line 7

def snapshot
  groups = Evilution::Integration::RSpec::StateGuard::Internals.world_ivar(:@example_groups)
  groups ? groups.dup.freeze : nil
end