spec/lib/hamster/deque/enqueue_spec.rb in hamster-1.0.1.pre.rc3 vs spec/lib/hamster/deque/enqueue_spec.rb in hamster-2.0.0

- old
+ new

@@ -1,26 +1,26 @@ require "spec_helper" require "hamster/deque" describe Hamster::Deque do - [:enqueue, :<<, :add, :conj, :conjoin, :push].each do |method| + [:enqueue, :push].each do |method| describe "##{method}" do [ [[], "A", ["A"]], [["A"], "B", %w[A B]], [["A"], "A", %w[A A]], [%w[A B C], "D", %w[A B C D]], ].each do |values, new_value, expected| describe "on #{values.inspect} with #{new_value.inspect}" do - let(:deque) { Hamster.deque(*values) } + let(:deque) { D[*values] } it "preserves the original" do deque.send(method, new_value) - deque.should eql(Hamster.deque(*values)) + deque.should eql(D[*values]) end it "returns #{expected.inspect}" do - deque.send(method, new_value).should eql(Hamster.deque(*expected)) + deque.send(method, new_value).should eql(D[*expected]) end end end end end \ No newline at end of file