Sha256: f4fcf137b22aea38d0cf268ab4febe70502dd723ca1334ae803839fe123d5e33
Contents?: true
Size: 1.1 KB
Versions: 12
Compression:
Stored size: 1.1 KB
Contents
#!/usr/bin/env ruby BEGIN { require 'pathname' basedir = Pathname.new( __FILE__ ).dirname.parent libdir = basedir + 'lib' extdir = basedir + 'ext' $LOAD_PATH.unshift( basedir ) unless $LOAD_PATH.include?( basedir ) $LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir ) $LOAD_PATH.unshift( extdir ) unless $LOAD_PATH.include?( extdir ) } require 'rspec' require 'bluecloth' require 'tidy' require 'spec/lib/helpers' ##################################################################### ### C O N T E X T S ##################################################################### describe BlueCloth, "-- MarkdownTest 1.0.3: " do markdowntest_dir = Pathname.new( __FILE__ ).dirname + 'data/markdowntest' pattern = markdowntest_dir + '*.text' Pathname.glob( pattern.to_s ).each do |textfile| resultfile = Pathname.new( textfile.to_s.sub(/\.text/, '.html') ) it textfile.basename( '.text' ) do markdown = textfile.read expected = resultfile.read options = { :smartypants => false } the_markdown( markdown, options ).should be_transformed_into_normalized_html( expected ) end end end
Version data entries
12 entries across 12 versions & 3 rubygems