spec/henkei_spec.rb in henkei-2.3.0.1 vs spec/henkei_spec.rb in henkei-2.4.0.1
- old
+ new
@@ -5,12 +5,12 @@
require 'nokogiri'
# Some of the tests have been known to fail in weird and wonderful ways when `rails` is included
require 'rails' if ENV['INCLUDE_RAILS'] == 'true'
-def travis_ci?
- ENV['CI'] == 'true' && ENV['TRAVIS'] == 'true'
+def ci?
+ ENV['CI'] == 'true'
end
describe Henkei do
let(:data) { File.read 'spec/samples/sample.docx' }
@@ -56,21 +56,21 @@
text = Henkei.read :text, data
expect(text).to eq ''
end
- unless travis_ci?
+ unless ci?
context 'when `include_ocr` is enabled' do
it 'returns parsed plain text in the image' do
text = Henkei.read :text, data, include_ocr: true
expect(text).to include <<~TEXT
West Side
-
+
Sea Island
PP
-
+
Richmond
TEXT
end
end
end
@@ -180,18 +180,18 @@
it '#mimetype returns `image/png`' do
expect(henkei.mimetype.content_type).to eq 'image/png'
end
- unless travis_ci?
+ unless ci?
context 'when `include_ocr` is enabled' do
it '#text returns plain text of parsed text in the image' do
expect(henkei.text(include_ocr: true)).to include <<~TEXT
West Side
-
+
Sea Island
PP
-
+
Richmond
TEXT
end
it '#html returns HTML of parsed text in the image' do