require 'rspec_ext' dir = File.dirname __FILE__ crystal_dir = File.expand_path "#{dir}/../.." lib_dir = "#{crystal_dir}/lib" $LOAD_PATH << lib_dir unless $LOAD_PATH.include? lib_dir require 'crystal/html' module Crystal class MockTemplateContext inject :config => :config, :workspace => :workspace attr_accessor :output, :capture, :buffer def capture &block block.call end def concat value = nil @buffer ||= "" @buffer << value nil end inherit Crystal::BasicHtmlHelper # include BasicHtmlHelper, FlashHelper, FormHelper, JavascriptHelper, UrlHelper end end require 'crystal/spec/environment' require 'crystal/spec/xhtml'