colorls/spec/color_ls/monkey_spec.rb
2020-12-23 22:32:36 +01:00

17 lines
395 B
Ruby

# frozen_string_literal: true
require 'colorls/monkeys'
RSpec.describe String do # rubocop:disable RSpec/FilePath
describe '#uniq' do
it 'removes all duplicate characters' do
expect('abca'.uniq).to be == 'abc'
end
end
describe String, '#colorize' do
it 'colors a string with red' do
expect('hello'.colorize(:red)).to be == Rainbow('hello').red
end
end
end