Sha256: 950c5c19beea9bd67802aaa0673bdcaacb0e095e73420e36a4e2818ae321874e
Contents?: true
Size: 757 Bytes
Versions: 15
Compression:
Stored size: 757 Bytes
Contents
require_relative 'spec_helper' describe SharedFormulaBuilder, "Formulas with shared_formula_offsets" do before(:each) do @builder = SharedFormulaBuilder.new @builder.shared_formula_offset = [1,1] end def ruby_for(formula) ast = Formula.parse(formula) ast.visit(@builder) end it "should move individual references appropriately" do ruby_for("A1").should == "b2" ruby_for("A$1").should == "b1" ruby_for("$A1").should == "a2" ruby_for("$A$1").should == "a1" end it "should move several references in the same formula" do ruby_for("A1+B2").should == "b2+c3" ruby_for("A$1+B$1").should == "b1+c1" ruby_for("$A1+$B1").should == "a2+b2" ruby_for("$A$1+$B$1").should == "a1+b1" end end
Version data entries
15 entries across 15 versions & 1 rubygems