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

Version Path
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/bluecloth-2.1.0/spec/markdowntest_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/bluecloth-2.1.0/spec/markdowntest_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/bluecloth-2.1.0/spec/markdowntest_spec.rb
bluecloth-2.1.0-x86-mswin32 spec/markdowntest_spec.rb
bluecloth-2.1.0-x86-mingw32 spec/markdowntest_spec.rb
bluecloth-2.1.0 spec/markdowntest_spec.rb
bluecloth-2.0.11 spec/markdowntest_spec.rb
bluecloth-2.0.11-x86-mswin32 spec/markdowntest_spec.rb
bluecloth-2.0.11-x86-mingw32 spec/markdowntest_spec.rb
bluecloth-2.0.11pre158-x86-mingw32 spec/markdowntest_spec.rb
bluecloth-2.0.11pre158-x86-mswin32 spec/markdowntest_spec.rb
bluecloth-2.0.11pre158 spec/markdowntest_spec.rb