diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-03-22 02:59:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-22 02:59:36 -0600 |
| commit | 8a5d4e42f411d194663cd207aeb8df31d98c0d7f (patch) | |
| tree | 22f374daecf3d458a7e17c41edf7bff4e028acd8 /test/substitutions_test.rb | |
| parent | 007649c5661d3b04b0969bc65a7f8b6d03b49089 (diff) | |
rearrange methods in Substitutors; mark private methods; update RDoc (PR #3187)
Diffstat (limited to 'test/substitutions_test.rb')
| -rw-r--r-- | test/substitutions_test.rb | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb index e6413b4f..ae5b850c 100644 --- a/test/substitutions_test.rb +++ b/test/substitutions_test.rb @@ -566,22 +566,15 @@ context 'Substitutions' do end test 'inline passthrough with id and role set using shorthand' do - para = block_from_string '[#id.role]+pass+' - assert_equal '<span id="id" class="role">pass</span>', para.content - end - - test 'should assign role attribute when shorthand style contains a role' do - para = block_from_string 'blah' - result = para.parse_quoted_text_attributes '.red#idref' - expect = { 'id' => 'idref', 'role' => 'red' } - assert_equal expect, result + %w(#idname.rolename .rolename#idname).each do |attrlist| + para = block_from_string %([#{attrlist}]+pass+) + assert_equal '<span id="idname" class="rolename">pass</span>', para.content + end end test 'should not assign role attribute if shorthand style has no roles' do - para = block_from_string 'blah' - result = para.parse_quoted_text_attributes '#idref' - expect = { 'id' => 'idref' } - assert_equal expect, result + para = block_from_string '[#idname]*blah*' + assert_equal '<strong id="idname">blah</strong>', para.content end end |
