File: remove_spec.rb

package info (click to toggle)
ruby-powerpack 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: ruby: 799; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 315 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'spec_helper'

describe 'String#remove' do
  it 'removes all occurrences of a pattern' do
    expect('Ladies Night'.remove(/Ladies /)).to eq('Night')
  end
end

describe 'String#remove!' do
  it 'removes all occurrences of a pattern' do
    expect('Ladies Night'.remove(/Ladies /)).to eq('Night')
  end
end