diff --git a/spec/chat_block_processor_spec.rb b/spec/chat_block_processor_spec.rb index 3843e98..4bae7fe 100644 --- a/spec/chat_block_processor_spec.rb +++ b/spec/chat_block_processor_spec.rb @@ -89,4 +89,36 @@ describe ChatBlock do actual = (Asciidoctor.convert input).tr_s '\n', '\n' (expect actual).to include expected.chomp end + + it 'should create a basic chat block with non-default values from the document' do + input = <<~INPUT + [chat, foodogsquared, state=nervous, role=shake] + ==== + Hello there! + + *wow* + ==== + INPUT + + expected = <<~RESULT +
+
+ foodogsquared +
+
+ foodogsquared +
+

Hello there!

+
+
+

wow

+
+
+
+ RESULT + + attributes = { 'avatarstype' => 'hello', 'avatarsdir' => '/avatars' } + actual = (Asciidoctor.convert input, attributes: attributes).tr_s '\n', '\n' + (expect actual).to include expected.chomp + end end