Sha256: 0c34ca0d1201b854ef93702646d43dc6b7fb2552549465d79152e5d1962f0aae
Contents?: true
Size: 555 Bytes
Versions: 12
Compression:
Stored size: 555 Bytes
Contents
require 'spec_helper' RSpec.describe Loga::Event, timecop: true do describe 'initialize' do context 'when no message is passed' do it 'sets message to an empty string' do expect(subject.message).to eq '' end end context 'when message is passed' do let(:message) { "stuff \xC2".force_encoding 'ASCII-8BIT' } let(:subject) { described_class.new message: message } it 'sanitizes the input to be UTF-8 convertable' do expect(subject.message.to_json).to eq '"stuff ?"' end end end end
Version data entries
12 entries across 12 versions & 1 rubygems