Exception: Invar::ImmutableRealityError

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/invar/errors.rb

Overview

Raised when #pretend is called but the testing extension has not been loaded.

When raised during normal operation, it may mean the application is calling #pretend directly, which is strongly discouraged. The feature is meant for testing.

See Also:

  • #pretend

Constant Summary collapse

HINT =
<<~HINT
   Try adding this to your test suite config file:
      require 'invar/test'
HINT
PRETEND_MSG =
"Method 'Invar::Scope#pretend' is defined in the testing extension. #{ HINT }".freeze
HOOK_MSG =
"Methods 'Invar.after_load and clear_hooks' are defined in the testing extension. #{ HINT }".freeze