Sha256: f1c3ec44a32e155f329c1b0f3fce43561aa53c641b669396aa7b538fb7fb8eb5

Contents?: true

Size: 581 Bytes

Versions: 14

Compression:

Stored size: 581 Bytes

Contents

describe 'array' do
  describe "prepend" do
    it "should add an element to the front of the array" do
      [1, 2, 3].prepend(0).should == [0, 1, 2, 3]
    end
    
    it "should change the array" do
      array = [1, 2, 3]
      array.prepend(0)
      array.should == [0, 1, 2, 3]
    end
  end
  
  describe "append" do
    it "should add an element to the back of the array" do
      [1, 2, 3].append(4).should == [1, 2, 3, 4]
    end
    
    it "should change the array" do
      array = [1, 2, 3]
      array.append(4)
      array.should == [1, 2, 3, 4]
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
motion-support-1.2.1 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-1.1.1 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-1.2.0 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-1.1.0 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-1.0.0 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.3.0 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion_blender-support-0.2.8 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion_blender-support-0.2.7 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.2.6 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.2.5 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.2.4 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.2.3 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.2.2 spec/motion-support/core_ext/array/prepend_and_append_spec.rb
motion-support-0.2.0 spec/motion-support/core_ext/array/prepend_and_append_spec.rb