Sha256: 07a8903994b06d747e0b0ec33e18a25723c4260b382e8dcc460a72995199655f

Contents?: true

Size: 610 Bytes

Versions: 15

Compression:

Stored size: 610 Bytes

Contents

require_relative 'spec_helper'

describe SingleCellArrayFormulaBuilder, "Single cell array formulas" do
  
  before(:each) do
    @builder = SingleCellArrayFormulaBuilder.new
  end
  
  def ruby_for(formula)
    ast = Formula.parse(formula)
    ast.visit(@builder)
  end
  
  it "should wrap operations in an array_operation(left,operation,right) methods" do
    ruby_for("SUM(F$437:F$449/$M$150:$M$162*($B454=$F$149:$N$149)*($F$150:$N$162))").should == "sum(m(a('f437','f449'),a('m150','m162'),(m(b454,a('f149','n149')) { |r1,r2| r1==r2 }),(a('f150','n162'))) { |r1,r2,r3,r4| r1/r2*r3*r4 })"
  end
  
    
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rubyfromexcel-0.0.23 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.22 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.21 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.20 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.19 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.18 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.17 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.16 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.13 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.10 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.9 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.7 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.6 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.5 spec/single_cell_array_formula_builder_spec.rb
rubyfromexcel-0.0.4 spec/single_cell_array_formula_builder_spec.rb