ika_bot/test/test_lesson.rb

17 lines
463 B
Ruby
Raw Normal View History

2025-08-16 15:57:52 -04:00
require_relative "../lib/lesson"
require "minitest/autorun"
class TestLesson < Minitest::Test
def setup
@scheduler = Minitest::Mock.new
2025-08-16 15:57:52 -04:00
end
def test_start
@lesson = Lesson.new [[1, "test the thing"], [3, "finish testing"]], scheduler: @scheduler
@scheduler.expect(:in, nil) { |time| time == "0m" }
@scheduler.expect(:in, nil) { |time| time == "1m" }
@scheduler.expect(:in, nil) { |time| time == "4m" }
@lesson.start! nil
2025-08-16 15:57:52 -04:00
end
end