metanorma-iso 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/spec/spec_helper.rb CHANGED
@@ -10,6 +10,7 @@ require "rspec/matchers"
10
10
  require "equivalent-xml"
11
11
  require "metanorma"
12
12
  require "metanorma/iso"
13
+ require "iev"
13
14
 
14
15
  RSpec.configure do |config|
15
16
  # Enable flags like --only-failures and --next-failure
@@ -215,11 +216,11 @@ def get_xml(search, code, opts)
215
216
  end
216
217
 
217
218
  def mock_open_uri(code)
218
- expect(OpenURI).to receive(:open_uri).and_wrap_original do |m, *args|
219
- expect(args[0]).to be_instance_of String
219
+ #expect(OpenURI).to receive(:open_uri).and_wrap_original do |m, *args|
220
+ expect(Iev).to receive(:get).with(code, "en") do |m, *args|
220
221
  file = "spec/examples/#{code.tr('-', '_')}.html"
221
222
  File.write file, m.call(*args).read unless File.exist? file
222
223
  File.read file
223
- end
224
+ end.at_least :once
224
225
  end
225
226
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-15 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor