Sha256: 3c1b671d6276db117386e986b303746c8c3bff06cde3b1020dcf345cd8aa886e

Contents?: true

Size: 606 Bytes

Versions: 5

Compression:

Stored size: 606 Bytes

Contents

require 'spec_helper'
module Alf
  module Operator::NonRelational
    describe Coerce do

      let(:operator_class){ Coerce }
      it_should_behave_like("An operator class")

      let(:input) {Alf::Relation[
        {:a => "12", :b => "14.0"},
      ]}

      subject{ operator.to_rel }

      context "--no-strict" do
        let(:expected){Alf::Relation[
          {:a => 12, :b => 14.0}
        ]}

        context "with Lispy" do
          let(:operator){ Lispy.coerce(input, :a => Integer, :b => Float) }
          it { should == expected }
        end

      end # --no-strict

    end 
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 spec/unit/alf-core/operator/non_relational/test_coerce.rb
alf-0.12.1 spec/unit/alf-core/operator/non_relational/test_coerce.rb
alf-0.12.0 spec/unit/alf-core/operator/non_relational/test_coerce.rb
alf-0.11.1 spec/unit/alf-core/operator/non_relational/test_coerce.rb
alf-0.11.0 spec/unit/alf-core/operator/non_relational/test_coerce.rb