Sha256: 97879063c6801017ac581a122a1189f68093a8646646eb35ee9d397f07ccc58c
Contents?: true
Size: 758 Bytes
Versions: 45
Compression:
Stored size: 758 Bytes
Contents
require "rspec" RSpec.configure do |config| config.expect_with :rspec do |c| c.syntax = :expect end config.filter_run focus: true config.run_all_when_everything_filtered = true end RSpec::Matchers.define :render_html do |html| diffable match do |markdown| @expected = html.strip instance = Middleman::HashiCorp::RedcarpetHTML.new instance.middleman_app = middleman_app options = Middleman::HashiCorp::RedcarpetHTML::REDCARPET_OPTIONS parser = Redcarpet::Markdown.new(instance, options) @actual = parser.render(markdown).strip @expected == @actual end end # The default middleman application server. # # @return [Middleman::Application] def middleman_app @app ||= Middleman::Application.server.inst end
Version data entries
45 entries across 45 versions & 1 rubygems