Sha256: 8ff46f90cb77977b54a1eca5b906390252e3a03a36924e272be6e4555b22643b

Contents?: true

Size: 462 Bytes

Versions: 61

Compression:

Stored size: 462 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require 'fedux_org_stdlib/core_ext/string/underline'

RSpec.describe 'String#underline' do
  it 'returns a string which is underlined' do
    expect('Headline'.underline).to eq <<-EOS.strip_heredoc.chomp
    Headline
    --------
    EOS
  end

  it 'is possible to change the character used' do
    expect('Headline'.underline(character: '#')).to eq <<-EOS.strip_heredoc.chomp
    Headline
    ########
    EOS
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.18 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.17 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.16 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.15 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.14 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.12 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.11 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.9 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.8 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.7 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.6 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.5 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.4 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.3 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.2 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.1 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.11.0 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.10.9 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.10.8 spec/core_ext/string/underline_spec.rb
fedux_org-stdlib-0.10.7 spec/core_ext/string/underline_spec.rb