File: remove_prefix_spec.rb

package info (click to toggle)
ruby-powerpack 0.1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 492 kB
  • sloc: ruby: 819; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

unless String.method_defined? :remove_prefix
  describe 'String#remove_prefix' do
    it 'removes a prefix in a string' do
      expect('Ladies Night'.remove_prefix('Ladies ')).to eq('Night')
    end
  end

  describe 'String#remove_prefix!' do
    it 'removes a prefix in a string' do
      expect('Ladies Night'.remove_prefix!('Ladies ')).to eq('Night')
    end
  end
end