File: drop_last_while_spec.rb

package info (click to toggle)
ruby-powerpack 0.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 320 kB
  • ctags: 53
  • sloc: ruby: 727; makefile: 2
file content (7 lines) | stat: -rw-r--r-- 199 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
require 'spec_helper'

describe 'Enumerable#drop_last_while' do
  it 'drops the last elements while a pred is true' do
    expect([1, 2, 3, 4, 6].drop_last_while(&:even?)).to eq([1, 2, 3])
  end
end