File: timer.rb

package info (click to toggle)
ruby-timers 4.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 216 kB
  • sloc: ruby: 973; makefile: 8
file content (18 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2025, by Patrik Wenger.
# Copyright, 2025, by Samuel Williams.

require "timers/timer"

describe Timers::Timer do
	let(:group) {Timers::Group.new}
	
	it "should return the block value when fired" do
		timer  = group.after(10) {:foo}
		result = timer.fire

		expect(result).to be == :foo
	end
end