require 'spec_helper' describe Hash do describe 'markdownified!' do let(:hash) { { something: 'hello **world**', something_else: '`the code`', other: '_foo_' } } context 'without options' do before { hash.markdownified! :something, :something_else } it { expect(hash).to eq other: "_foo_", something: "

hello world

\n", something_else: "

the code

\n" } end context 'with options' do before { hash.markdownified! :something, :something_else, one_liner: true } it { expect(hash).to eq other: "_foo_", something: "hello world", something_else: "the code" } end end end