Sha256: 75f8be85c9ef2aa775dd096f462f6445f125061e7013a442a67558414e45ccb3
Contents?: true
Size: 550 Bytes
Versions: 2
Compression:
Stored size: 550 Bytes
Contents
require File.expand_path('../../spec_helper', File.dirname(__FILE__)) require 'hamster/core_ext/enumerable' describe Enumerable do class TestEnumerable include Enumerable def initialize(*values) @values = values end def each(&block) @values.each(&block) end end describe "#to_list" do before do enumerable = TestEnumerable.new("A", "B", "C") @list = enumerable.to_list end it "returns an equivalent list" do @list.should == Hamster.list("A", "B", "C") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hamster-0.2.7 | spec/hamster/core_ext/enumerable_spec.rb |
hamster-0.2.6 | spec/hamster/core_ext/enumerable_spec.rb |