░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/vendor/bundle/ruby/3.1.0/gems/rspec_around_all-0.2.0/lib
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: rspec_around_all.rb
require 'delegate' require 'fiber' module RSpecAroundAll class FiberAwareGroup < SimpleDelegator def run_examples Fiber.yield end def to_proc proc { run_examples } end end def around(scope = :each, &block) # let RSpec handle around(:each) hooks... return super(scope, &block) unless scope == :all group, fiber = self, nil before(:all) do fiber = Fiber.new(&block) fiber.resume(FiberAwareGroup.new(group)) end after(:all) do fiber.resume end end end RSpec.configure do |c| c.extend RSpecAroundAll end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 rspec_around_all.rb
RB
591 B
2023-09-24 03:48
EDIT