Sha256: 4257bf83fda48e0f44fd8a8413b580186ec25f5329d2217767b1b71f3dc99355
Contents?: true
Size: 1.29 KB
Versions: 3
Compression:
Stored size: 1.29 KB
Contents
require 'cover_me' require 'test/unit' require 'turn' if RUBY_PLATFORM=='java' require 'rhino' else require 'v8' end # allows import of patient api without rails module HqueryPatientApi module Rails class Engine end end end PROJECT_ROOT = File.expand_path("../../", __FILE__) require File.join(PROJECT_ROOT, 'lib', 'hqmf2js') def get_js_context(javascript) if RUBY_PLATFORM=='java' @context = Rhino::Context.new else @context = V8::Context.new end @context.eval(javascript) @context end def initialize_javascript_context(hqmf_utils, codes_json, converted_hqmf) fixture_json = File.read('test/fixtures/patients/larry_vanderman.json') initialize_patient = 'var numeratorPatient = new hQuery.Patient(larry);' if RUBY_PLATFORM=='java' @context = Rhino::Context.new else @context = V8::Context.new end @context.eval(" #{hqmf_utils} var OidDictionary = #{codes_json}; #{converted_hqmf} var larry = #{fixture_json}; #{initialize_patient}") @context.eval("hqmf.SpecificsManager.initialize()") end def compile_coffee_script ctx = Sprockets::Environment.new(File.expand_path("../../..", __FILE__)) Tilt::CoffeeScriptTemplate.default_bare = true ctx.append_path "app/assets/javascripts" HQMF2JS::Generator::JS.library_functions end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hqmf2js-1.2.1 | test/test_helper.rb |
hqmf2js-1.2.0 | test/test_helper.rb |
hqmf2js-1.1.0 | test/test_helper.rb |