Sha256: 81b2046f2b33610564fa21563911c1be830ff28efc9fc35d92175ada5609bd95

Contents?: true

Size: 702 Bytes

Versions: 26

Compression:

Stored size: 702 Bytes

Contents

require 'spec_helper'

describe Array do

  describe "#to_includes" do

    it "should pass 1 test" do
      [].to_includes.should == []
    end

    it "should pass 2 test" do
      ["foo"].to_includes.should == [:foo]
    end

    it "should pass 3 test" do
      ["foo.bar", "baz", "foo"].to_includes.should == [{:foo => :bar}, :baz, :foo]
    end

    it "should pass 4 test" do
      ["foo.bar.baz", "foo.bar.hola", "foo.hello"].to_includes.should == [{:foo => {:bar => :baz}}, {:foo => {:bar => :hola}}, {:foo => :hello}]
    end

    it "should pass 5 test" do
      ["foo.bar.baz", "foo.bar.hola"].to_includes.should == [{:foo => {:bar => :baz}}, {:foo => {:bar => :hola}}]
    end

  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
puffer-0.1.1 spec/lib/extensions/core_spec.rb
puffer-0.1.0 spec/lib/extensions/core_spec.rb
puffer-0.0.32 spec/lib/extensions/core_spec.rb
puffer-0.0.31 spec/lib/extensions/core_spec.rb
puffer-0.0.30 spec/lib/extensions/core_spec.rb
puffer-0.0.29 spec/lib/extensions/core_spec.rb
puffer-0.0.28 spec/lib/extensions/core_spec.rb
puffer-0.0.26 spec/lib/extensions/core_spec.rb
puffer-0.0.25 spec/lib/extensions/core_spec.rb
puffer-0.0.24 spec/lib/extensions/core_spec.rb
puffer-0.0.23 spec/lib/extensions/core_spec.rb
puffer-0.0.22 spec/lib/extensions/core_spec.rb
puffer-0.0.21 spec/lib/extensions/core_spec.rb
puffer-0.0.20 spec/lib/extensions/core_spec.rb
puffer-0.0.19 spec/lib/extensions/core_spec.rb
puffer-0.0.18 spec/lib/extensions/core_spec.rb
puffer-0.0.17 spec/lib/extensions/core_spec.rb
puffer-0.0.16 spec/lib/extensions/core_spec.rb
puffer-0.0.15 spec/lib/extensions/core_spec.rb
puffer-0.0.14 spec/lib/extensions/core_spec.rb