Class: Shoes::SpecInstance

Inherits:
Object
  • Object
show all
Defined in:
lacci/lib/shoes-spec.rb

Overview

ShoesSpec testing objects can optionally inherit from this object, which shows the ShoesSpec testing API.

See Also:

  • {Shoes{Shoes::Spec{Shoes::Spec.instance=}

Instance Method Summary collapse

Instance Method Details

#run_shoes_spec_test_code(code, class_name: nil, test_name: nil) ⇒ void

This method returns an undefined value.

Once a Shoes app has been created, this method can be called to execute Shoes-Spec testing code for that application. Shoes-Spec uses Minitest for most of its APIs, and Minitest generally reports results with a class name and test name. If those aren't passed explicitly, the SpecInstance can choose reasonable defaults.

The test code should be set up to run automatically from the display service's existing hooks. For instance, the code might run in response to the first heartbeat, if the display service uses heartbeats.

The test code will export assertion data in its native format. Multiple display services choose to use the Scarpe-Component for Minitest data export, which is straightforward to import into the Shoes-Spec test harness.

Parameters:

  • code (String)

    the ShoesSpec code to execute

  • class_name (String|NilClass) (defaults to: nil)

    the Minitest class name for reporting or nil

  • test_name (String|NilClass) (defaults to: nil)

    the Minitest test name for reporting or nil



47
48
49
# File 'lacci/lib/shoes-spec.rb', line 47

def run_shoes_spec_test_code(code, class_name: nil, test_name: nil)
  raise "Child class should override this!"
end