diff options
| author | 2019-02-01 19:23:07 -0500 | |
|---|---|---|
| committer | 2019-02-01 19:23:07 -0500 | |
| commit | 5a669c40673841aad681da3fe343c4a902a3bf6c (patch) | |
| tree | eec5e8bf16e20eef2f192ca056e8702d47c5d989 /spec/lib/roo/utils_spec.rb | |
| parent | eeb0202b3730c4b9596b6b409f565e9f5a8dce4c (diff) | |
| parent | 46eadd2724cd841328d90c3143a485fcdf423ed6 (diff) | |
Update upstream source from tag 'upstream/2.8.2'
Update to upstream version '2.8.2'
with Debian dir b1ec8fbbaccffac36549be25adf232dec8fac090
Diffstat (limited to 'spec/lib/roo/utils_spec.rb')
| -rw-r--r-- | spec/lib/roo/utils_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/roo/utils_spec.rb b/spec/lib/roo/utils_spec.rb index 8f322d4..c000ae7 100644 --- a/spec/lib/roo/utils_spec.rb +++ b/spec/lib/roo/utils_spec.rb @@ -90,6 +90,19 @@ RSpec.describe ::Roo::Utils do end end + context '.coordinates_in_range' do + it "returns the expected result" do + expect(described_class.coordinates_in_range('').to_a).to eq [] + expect(described_class.coordinates_in_range('B2').to_a).to eq [[2, 2]] + expect(described_class.coordinates_in_range('D2:G3').to_a).to eq [[2, 4], [2, 5], [2, 6], [2, 7], [3, 4], [3, 5], [3, 6], [3, 7]] + expect(described_class.coordinates_in_range('G3:D2').to_a).to eq [] + end + + it "raises an error when appropriate" do + expect { described_class.coordinates_in_range('D2:G3:I5').to_a }.to raise_error(ArgumentError) + end + end + context '.load_xml' do it 'returns the expected result' do expect(described_class.load_xml('test/files/sheet1.xml')).to be_a(Nokogiri::XML::Document) |
