spec: fix qti_exporter specs for ruby 1.9

Change-Id: Ic6cdb5a587c9a081957f48d9b770a75620e7dcea
Reviewed-on: https://gerrit.instructure.com/15112
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
Tested-by: Jenkins <jenkins@instructure.com>
This commit is contained in:
Brian Palmer 2012-11-07 13:26:20 -07:00
parent f1db3089f2
commit 0a1d780259
3 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/../../qti_helper'
require File.expand_path(File.dirname(__FILE__) + '/../../qti_helper')
if Qti.migration_executable
describe "Converting Blackboard 9 qti" do
@ -44,4 +45,4 @@ module BB9Expected
{:right=>"Ganymede", :text=>"Jupiter", :left=>"Jupiter", :comments=>""}],
:question_name=>""}
end
end
end

View File

@ -1,3 +1,5 @@
# encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../../../../spec/spec_helper')
require 'zip/zipfilesystem'
@ -375,6 +377,10 @@ describe Qti::Converter do
{"match_id"=>5875, "text"=>"Distractor 1"},
{"match_id"=>2330, "text"=>"Distractor 2"}],
"question_text"=>"This is the question text."}]
if RUBY_VERSION >= '1.9'
# handle new nokogiri behavior of NOT turning these utf-8 chars into html entities
RESPONDUS_QUESTIONS[0]["question_text"] = "This is the question text.<br>\nThese are some symbol font characters: <span style=\"font-size: 12pt;\">∂♥∃Δƒ</span>"
end
end
end

View File

@ -1,7 +1,7 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../../spec/spec_helper')
unless defined? BASE_FIXTURE_DIR
BASE_FIXTURE_DIR = File.dirname(__FILE__) + '/fixtures/'
BASE_FIXTURE_DIR = File.expand_path(File.dirname(__FILE__)) + '/fixtures/'
CANVAS_FIXTURE_DIR = BASE_FIXTURE_DIR + 'canvas/'
VISTA_FIXTURE_DIR = BASE_FIXTURE_DIR + 'bb_vista/'
BB8_FIXTURE_DIR = BASE_FIXTURE_DIR + 'bb8/'