robust_excel_ole 1.19.11 → 1.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  require File.join(File.dirname(__FILE__), './spec_helper')
4
+ require 'pathname'
4
5
 
5
6
  $VERBOSE = nil
6
7
 
@@ -20,6 +21,7 @@ describe Workbook do
20
21
  before do
21
22
  @dir = create_tmpdir
22
23
  @simple_file = @dir + '/workbook.xls'
24
+ @pathname_file = Pathname(@dir) + 'workbook.xls'
23
25
  @simple_save_file = @dir + '/workbook_save.xls'
24
26
  @different_file = @dir + '/different_workbook.xls'
25
27
  @simple_file_other_path = @dir + '/more_data/workbook.xls'
@@ -47,6 +49,16 @@ describe Workbook do
47
49
  @book.close
48
50
  end
49
51
  end
52
+
53
+ context "with pathname" do
54
+ it "open an existing file" do
55
+ expect {
56
+ @book = Workbook.open(@pathname_file)
57
+ }.to_not raise_error
58
+ @book.should be_a Workbook
59
+ @book.close
60
+ end
61
+ end
50
62
  end
51
63
 
52
64
  describe "Book" do
@@ -763,7 +763,7 @@ describe Workbook do
763
763
  @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
764
764
  @book1["new"].should == "bar"
765
765
  @book1["new"] = "bar"
766
- @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 42
766
+ @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
767
767
  @book1.save
768
768
  @book1.close
769
769
  #book2 = Workbook.open(@simple_file1, :visible => true)
@@ -777,7 +777,7 @@ describe Workbook do
777
777
  @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
778
778
  @book1["new"].should == "bar"
779
779
  @book1["new"] = "bar"
780
- @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 42
780
+ @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
781
781
  @book1.save
782
782
  @book1.close
783
783
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robust_excel_ole
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.11
4
+ version: '1.22'
5
5
  platform: ruby
6
6
  authors:
7
7
  - traths
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-13 00:00:00.000000000 Z
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -132,6 +132,7 @@ files:
132
132
  - lib/robust_excel_ole/workbook.rb
133
133
  - lib/robust_excel_ole/worksheet.rb
134
134
  - lib/spec_helper.rb
135
+ - reo.bat
135
136
  - robust_excel_ole.gemspec
136
137
  - spec/address_tool_spec.rb
137
138
  - spec/base_spec.rb