Sha256: c6ee64fa4e268f783623ba3f0059ad3869552ef44ba60f3ffed42e0f31d926d7

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require 'spec_helper'
module Alf
  module Operator::Relational
    describe Unnest do
        
      let(:operator_class){ Unnest }
      it_should_behave_like("An operator class")
        
      let(:input) {[
        {:nested => {:a => "a", :b => "b"}, :c => "c"}
      ]}
  
      let(:expected) {[
        {:a => "a", :b => "b", :c => "c"},
      ]}
  
      subject{ operator.to_a }
  
      describe "when factored with commandline args" do
        let(:operator){ Unnest.run(%w{-- nested}) }
        before{ operator.pipe(input) }
        it { should == expected }
      end
  
      describe "when factored with Lispy" do
        let(:operator){ Lispy.unnest(input, :nested) }
        it { should == expected }
      end
  
    end 
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-0.9.0 spec/operator/relational/unnest_spec.rb