Sha256: b468024901a81581ed467cab596b5a73f631755b9592936fe3ba1141a12b02ba

Contents?: true

Size: 497 Bytes

Versions: 5

Compression:

Stored size: 497 Bytes

Contents

# frozen_string_literal: true

require "phlex"
require "bundler"

Bundler.require :test

module TestHelper
	def build_component_with_template(&block)
		Class.new(Phlex::HTML) { define_method(:template, &block) }
	end
end

module ToRender
	def to_render(expected_output)
		output = subject.call
		assert(output == expected_output) { "Expected `#{output.inspect}` to equal `#{expected_output.inspect}`." }
	end
end

GreenDots.configure do |config|
	config.register_matcher ToRender, Phlex::SGML
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
phlex-1.9.2 gd/support/helper.rb
phlex-1.10.1 gd/support/helper.rb
phlex-1.10.0 gd/support/helper.rb
phlex-1.9.1 gd/support/helper.rb
phlex-1.9.0 gd/support/helper.rb