Skip to content

Commit

Permalink
Get users-guide tests running
Browse files Browse the repository at this point in the history
And with this commit, no more errors. Next up is dealing with the
remaining failures
  • Loading branch information
dafyddcrosby committed May 23, 2022
1 parent a492070 commit 4e291f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/data/users-guide/example_address_book.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
require 'address_book'
require_relative 'address_book'
require 'yaml'
require 'pp'
require 'date'

str = File.read('address_book.yaml')
ydoc = YAML.load(str)
ydoc = YAML.load(str, permitted_classes: [Date])
addrbook = AddressBook.new(ydoc)

pp addrbook.groups
Expand Down
2 changes: 1 addition & 1 deletion test/data/users-guide/loadbabel.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'kwalify'
require 'models'
require_relative 'models'

## load schema definition
schema = Kwalify::Yaml.load_file('BABEL.schema.yaml',
Expand Down
3 changes: 2 additions & 1 deletion test/test-users-guide.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

class UsersGuideTest < Test::Unit::TestCase

DATA_DIR = 'data/users-guide'
DATA_DIR = 'test/data/users-guide'
CURR_DIR = Dir.pwd
puts "CURR DIR is #{CURR_DIR}"
for item in Dir.glob("#{DATA_DIR}/*.result").sort()
filename = File.basename(item)
name = (filename =~ /(.*)\.\w+$/) && $1.gsub(/[^\w]/, '_')
Expand Down

0 comments on commit 4e291f5

Please sign in to comment.