summaryrefslogtreecommitdiff
path: root/spec/javascripts/extensions/array_spec.js
blob: eced2f6575d3ad9f3e4211f03d73f7bd732e3907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

/*= require extensions/array */

(function() {
  describe('Array extensions', function() {
    describe('first', function() {
      return it('returns the first item', function() {
        var arr;
        arr = [0, 1, 2, 3, 4, 5];
        return expect(arr.first()).toBe(0);
      });
    });
    return describe('last', function() {
      return it('returns the last item', function() {
        var arr;
        arr = [0, 1, 2, 3, 4, 5];
        return expect(arr.last()).toBe(5);
      });
    });
  });

}).call(this);