File: array_spec.rb

package info (click to toggle)
yard 0.9.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,720 kB
  • sloc: ruby: 31,354; javascript: 7,608; makefile: 21
file content (13 lines) | stat: -rw-r--r-- 327 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

RSpec.describe Array do
  describe "#place" do
    it "creates an Insertion object" do
      expect([].place('x')).to be_kind_of(Insertion)
    end

    it "allows multiple objects to be placed" do
      expect([1, 2].place('x', 'y', 'z').before(2)).to eq [1, 'x', 'y', 'z', 2]
    end
  end
end