diff options
| author | 2019-01-14 01:41:26 -0500 | |
|---|---|---|
| committer | 2019-01-14 01:41:26 -0500 | |
| commit | 6aa7e04e06423e7d92ede727489ea346e88f7108 (patch) | |
| tree | 9bdec92fd17898b662235bc0a491de827990130c /spec/lib/roo/strict_spec.rb | |
| parent | c59817e300dbe1aab3120cad603cdb14b14ed78b (diff) | |
| parent | dddfa903d2b856146f05ffb4415c31d6127bb5bf (diff) | |
Update upstream source from tag 'upstream/2.8.0'
Update to upstream version '2.8.0'
with Debian dir 569f5866fbcf4e449c6c48dc5d20a3ab54f95252
Diffstat (limited to 'spec/lib/roo/strict_spec.rb')
| -rw-r--r-- | spec/lib/roo/strict_spec.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/lib/roo/strict_spec.rb b/spec/lib/roo/strict_spec.rb new file mode 100644 index 0000000..811ee51 --- /dev/null +++ b/spec/lib/roo/strict_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper' + +describe Roo::Excelx do + subject { Roo::Excelx.new('test/files/strict.xlsx') } + + example '#sheets' do + expect(subject.sheets).to eq %w(Sheet1 Sheet2) + end + + example '#sheet' do + expect(subject.sheet('Sheet1')).to be_a(Roo::Excelx) + end + + example '#cell' do + expect(subject.cell(1, 1)).to eq 'Sheet 1' + expect(subject.cell(1, 1, 'Sheet2')).to eq 'Sheet 2' + end + + example '#row' do + expect(subject.row(1)).to eq ['Sheet 1'] + expect(subject.row(1, 'Sheet2')).to eq ['Sheet 2'] + end + + example '#first_row' do + expect(subject.first_row).to eq 1 + expect(subject.first_row('Sheet2')).to eq 1 + end + + example '#last_row' do + expect(subject.last_row).to eq 1 + expect(subject.last_row('Sheet2')).to eq 1 + end + + example '#first_column' do + expect(subject.first_column).to eq 1 + expect(subject.first_column('Sheet2')).to eq 1 + end + + example '#last_column' do + expect(subject.last_column).to eq 1 + expect(subject.last_column('Sheet2')).to eq 1 + end +end |
