Sha256: 061da4d9bfcb81c3fba94b62b048f03a09947d0068752c18782f9df6406237c6
Contents?: true
Size: 490 Bytes
Versions: 3
Compression:
Stored size: 490 Bytes
Contents
# -*- coding: utf-8 -*- require "spec_helper" require "agate/formatter/html" RSpec.describe Agate::Formatter::HTML do let(:text) { "勉【べん】" } let(:formatted_text) { "<ruby>勉<rp>【</rp><rt>べん</rt><rp>】</rp></ruby>" } let(:expr) { /(\p{Han}+)(【)([\p{Hiragana}\p{Katakana}]+)(】)/u } it "returns the string formatted as HTML5 ruby" do expect(text.gsub(expr) { |match| Agate::Formatter::HTML.format($~) }).to eql(formatted_text) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
agate-0.6.0 | spec/agate/formatter/html_spec.rb |
agate-0.5.1 | spec/agate/formatter/html_spec.rb |
agate-0.5.0 | spec/agate/formatter/html_spec.rb |