module Opal::Testing::SpecHelper

Overview

Top-level helper module designed to be included in Crystal spec suites.

Included Modules

Defined in:

opal/testing.cr

Instance Method Summary

Instance methods inherited from module Opal::Testing::BufferAssertions

assert_buffer_lines(buffer : UI::Buffer, expected : Array(String), trim_trailing : Bool = true, file = __FILE__, line = __LINE__) : Nil assert_buffer_lines, assert_cell(buffer : UI::Buffer, x : Int32, y : Int32, char : Char | Nil = nil, fg : Color | Nil = nil, bg : Color | Nil = nil, bold : Bool | Nil = nil, underline : Bool | Nil = nil, dim : Bool | Nil = nil, italic : Bool | Nil = nil, file = __FILE__, line = __LINE__) : Nil assert_cell, buffer_lines(buffer : UI::Buffer, trim_trailing : Bool = true) : Array(String) buffer_lines, driver_lines(driver : Terminal::MockDriver, trim_trailing : Bool = true) : Array(String) driver_lines

Instance Method Detail

def create_frame_recorder : FrameRecorder #

Creates a new FrameRecorder instance.


[View source]
def pilot_for(target : UI::Engine | UI::Screen | UI::ScreenStack, driver : Terminal::MockDriver | Nil = nil) : Pilot #

Creates a new Pilot test harness for an Engine, Screen, or ScreenStack.


[View source]
def teatest(model : TEA::Model, width : Int32 = 80, height : Int32 = 24, alt_screen : Bool = false, mouse_enabled : Bool = false, diff_render : Bool = false) : TestProgram #

Creates and launches a Bubbletea-inspired TestProgram for a TEA Model.


[View source]