Sha256: 5b29465fbda5afa9614a5bbf7ec2637866d565da8bc5a3a81eb1dea1618325f5

Contents?: true

Size: 561 Bytes

Versions: 9

Compression:

Stored size: 561 Bytes

Contents

require 'spec_helper'
module Alf
  module Engine
    describe Wrap do

      let(:input) {[
        {:a => "a", :b => "b", :c => "c"},
      ]}

      let(:expected) {[
        {:wrapped => {:a => "a", :b => "b"}, :c => "c"}
      ]}

      it "should wrap as expected" do
        wrap = Wrap.new(input, AttrList[:a, :b], :wrapped, false)
        wrap.to_a.should eq(expected)
      end

      it "should support allbut wrapping" do
        wrap = Wrap.new(input, AttrList[:c], :wrapped, true)
        wrap.to_a.should eq(expected)
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-engine/test_wrap.rb
alf-core-0.14.0 spec/unit/alf-engine/test_wrap.rb
alf-core-0.13.1 spec/unit/alf-engine/test_wrap.rb
alf-core-0.13.0 spec/unit/alf-engine/test_wrap.rb
alf-0.12.2 spec/unit/alf-engine/test_wrap.rb
alf-0.12.1 spec/unit/alf-engine/test_wrap.rb
alf-0.12.0 spec/unit/alf-engine/test_wrap.rb
alf-0.11.1 spec/unit/alf-engine/test_wrap.rb
alf-0.11.0 spec/unit/alf-engine/test_wrap.rb