require_relative "../lib/lesson" require "minitest/autorun" class TestLesson < Minitest::Test def setup @scheduler = Minitest::Mock.new 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 end end