summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-01-10 23:51:18 -0700
committerDan Allen <dan.j.allen@gmail.com>2022-01-11 00:01:27 -0700
commited608c61d061cd8bbdd24e6d83d6793ce5f2edb6 (patch)
treeebae3c1236b833e8b33cefe0d00289b404e258ea /test
parentfb22875a53e7e05e8a5a0895b6083acb22ec4cc0 (diff)
use parallel methods on Object to remove and set AsciiMath constant in tests
Diffstat (limited to 'test')
-rw-r--r--test/substitutions_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index fd7e0b07..5cb3b1c2 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -2025,11 +2025,11 @@ context 'Substitutions' do
para = block_from_string input, backend: :docbook
para.document.converter.instance_variable_set :@asciimath_status, :unavailable
if asciimath_available
- old_asciimath = ::AsciiMath
- Object.send :remove_const, 'AsciiMath'
+ old_asciimath = AsciiMath
+ Object.send :remove_const, :AsciiMath
end
assert_equal '<inlineequation><mathphrase><![CDATA[a < b]]></mathphrase></inlineequation>', para.content
- ::AsciiMath = old_asciimath if asciimath_available
+ Object.const_set :AsciiMath, old_asciimath if asciimath_available
end
test 'should honor explicit subslist on asciimath macro' do