robust_excel_ole 1.29 → 1.30

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.
@@ -613,7 +613,7 @@ describe Worksheet do
613
613
  end
614
614
  end
615
615
 
616
- describe "namevalue_glob, set_namevalue_glob" do
616
+ describe "namevalue_global, set_namevalue_global" do
617
617
 
618
618
  before do
619
619
  @book1 = Workbook.open(@dir + '/another_workbook.xls')
@@ -625,54 +625,54 @@ describe Worksheet do
625
625
  end
626
626
 
627
627
  it "should return value of a defined name" do
628
- @sheet1.namevalue_glob("firstcell").should == "foo"
628
+ @sheet1.namevalue_global("firstcell").should == "foo"
629
629
  end
630
630
 
631
631
  #it "should evaluate a formula" do
632
- # @sheet1.namevalue_glob("another_formula").should == 5
632
+ # @sheet1.namevalue_global("another_formula").should == 5
633
633
  #end
634
634
 
635
635
  it "should raise an error if name not defined" do
636
636
  expect {
637
- @sheet1.namevalue_glob("foo")
637
+ @sheet1.namevalue_global("foo")
638
638
  }.to raise_error(NameNotFound, /name "foo" not in/)
639
639
  end
640
640
 
641
641
  it "should raise an error of coordinates are given instead of a defined name" do
642
642
  expect {
643
- @sheet1.namevalue_glob("A1")
643
+ @sheet1.namevalue_global("A1")
644
644
  }.to raise_error(NameNotFound, /name "A1" not in/)
645
645
  end
646
646
 
647
647
  it "should return default value for a range with empty contents" do
648
- @sheet1.namevalue_glob("another", :default => 2) == 2
648
+ @sheet1.namevalue_global("another", :default => 2) == 2
649
649
  end
650
650
 
651
651
  it "should set a range to a value" do
652
- @sheet1.namevalue_glob("firstcell").should == "foo"
652
+ @sheet1.namevalue_global("firstcell").should == "foo"
653
653
  @sheet1[1,1].Value.should == "foo"
654
- @sheet1.set_namevalue_glob("firstcell","bar")
655
- @sheet1.namevalue_glob("firstcell").should == "bar"
654
+ @sheet1.set_namevalue_global("firstcell","bar")
655
+ @sheet1.namevalue_global("firstcell").should == "bar"
656
656
  @sheet1[1,1].Value.should == "bar"
657
657
  end
658
658
 
659
659
  it "should raise an error if name cannot be evaluated" do
660
660
  expect{
661
- @sheet1.set_namevalue_glob("foo", 1)
661
+ @sheet1.set_namevalue_global("foo", 1)
662
662
  }.to raise_error(RangeNotEvaluatable, /cannot assign value/)
663
663
  end
664
664
 
665
665
  it "should color the cell (deprecated)" do
666
- @sheet1.set_namevalue_glob("new", "bar")
666
+ @sheet1.set_namevalue_global("new", "bar")
667
667
  @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == -4142
668
- @sheet1.set_namevalue_glob("new", "bar", :color => 4)
668
+ @sheet1.set_namevalue_global("new", "bar", :color => 4)
669
669
  @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
670
670
  end
671
671
 
672
672
  it "should color the cell" do
673
- @sheet1.set_namevalue_glob("new", "bar")
673
+ @sheet1.set_namevalue_global("new", "bar")
674
674
  @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == -4142
675
- @sheet1.set_namevalue_glob("new", "bar", :color => 4)
675
+ @sheet1.set_namevalue_global("new", "bar", :color => 4)
676
676
  @book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
677
677
  end
678
678
 
@@ -735,7 +735,7 @@ describe Worksheet do
735
735
 
736
736
  it "should raise an error if name cannot be evaluated" do
737
737
  expect{
738
- @sheet1.set_namevalue_glob("foo", 1)
738
+ @sheet1.set_namevalue_global("foo", 1)
739
739
  }.to raise_error(RangeNotEvaluatable, /cannot assign value/)
740
740
  end
741
741
 
@@ -751,7 +751,7 @@ describe Worksheet do
751
751
  }.to raise_error(NameNotFound, /name "foo" not in #<Worksheet: Sheet1/)
752
752
  @sheet1.namevalue("foo", :default => nil).should be_nil
753
753
  @sheet1.namevalue("foo", :default => 1).should == 1
754
- @sheet1.namevalue_glob("empty", :default => 1).should be_nil
754
+ @sheet1.namevalue_global("empty", :default => 1).should be_nil
755
755
  end
756
756
 
757
757
  it "should color the cell (depracated)" do
@@ -815,14 +815,14 @@ describe Worksheet do
815
815
  it "should rename a range" do
816
816
  @sheet1.add_name("foo",[1,1])
817
817
  @sheet1.rename_range("foo","bar")
818
- @sheet1.namevalue_glob("bar").should == "foo"
818
+ @sheet1.namevalue_global("bar").should == "foo"
819
819
  end
820
820
 
821
821
  it "should delete a name of a range" do
822
822
  @sheet1.add_name("foo",[1,1])
823
823
  @sheet1.delete_name("foo")
824
824
  expect{
825
- @sheet1.namevalue_glob("foo")
825
+ @sheet1.namevalue_global("foo")
826
826
  }.to raise_error(NameNotFound, /name "foo"/)
827
827
  end
828
828
 
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.29'
4
+ version: '1.30'
5
5
  platform: ruby
6
6
  authors:
7
7
  - traths
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry