Skip to content

Commit

Permalink
Allow for random statement order in writer. Use normalized language s…
Browse files Browse the repository at this point in the history
…trings.
  • Loading branch information
gkellogg committed Jan 18, 2016
1 parent a18010c commit 02a894f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rvm:
- 2.0
- 2.1
- 2.2.4
- 2.3.0
- jruby-9.0.4.0
- rbx-2
cache: bundler
Expand Down
4 changes: 2 additions & 2 deletions spec/reader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@
end

it "should allow mixed-case language" do
trig = %({:x2 :p "xyz"@EN .})
trig = %({:x2 :p "xyz"@en .})
statement = parse(trig, prefixes: {nil => ''}).statements.to_a.first
expect(statement.object.to_ntriples).to eq %("xyz"@EN)
expect(statement.object.to_ntriples).to eq %("xyz"@en)
end

it "should create typed literals" do
Expand Down
4 changes: 2 additions & 2 deletions spec/writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@

def parse(input, options = {})
reader = RDF::Reader.for(options.fetch(:format, :trig))
RDF::Repository.new << reader.new(input, options)
reader.new(input, options, &:each).to_a.extend(RDF::Enumerable)
end

# Serialize ntstr to a string and compare against regexps
Expand All @@ -183,7 +183,7 @@ def serialize(ntstr, base = nil, regexps = [], options = {})
end

regexps.each do |re|
expect(result).to match_re(re, about: base, debug: @debug, input: ntstr)
expect(result).to match_re(re, about: base, logger: logger, input: ntstr)
end

result
Expand Down

0 comments on commit 02a894f

Please sign in to comment.