test/helper.rb in sanford-0.9.0 vs test/helper.rb in sanford-0.10.0

- old
+ new

@@ -9,11 +9,20 @@ ENV['SANFORD_PROTOCOL_DEBUG'] = 'yes' require 'sanford' ROOT = File.expand_path('../..', __FILE__) + +MyTestEngine = Class.new(Sanford::TemplateEngine) do + def render(path, service_handler, locals) + [path.to_s, service_handler.class.to_s, locals] + end +end Sanford.configure do |config| config.services_file = File.join(ROOT, 'test/support/services') + config.set_template_source File.join(ROOT, 'test/support') do |s| + s.engine 'test', MyTestEngine + end end Sanford.init require 'test/support/fake_connection' require 'test/support/service_handlers'