I am trying to make a module that has a bunch of helper definitions. Some of the defs use assert from Minitest::Assertions. How can i get access to these assertions inside a module. Mock example below
module Helper
require 'minitest'
TEST = Minitest::Assertions
module Helper::Scripts
def self.assertion
TEST.assert true
end
end
end
Helper::Scripts.assertion #undefined assert
You need to define an instance accessor named
assertionsWe can use TestHelpers this way: