Sha256: aafb53d696982069f401ce6e485e660be6d8a89d4cad2645c987c4dfcf61c605

Contents?: true

Size: 489 Bytes

Versions: 1

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

RSpec.describe RSpeed::Splitter, '#append' do
  subject(:splitter) { described_class.new }

  let!(:redis) { redis_object }

  it 'appends file and time on rspeed key' do
    splitter.append(
      items: [{ file: '1_spec.rb', time: 1 }.to_json, { file: '2_spec.rb', time: 2 }.to_json],
      key: 'rspeed'
    )

    expect(redis.lrange('rspeed', 0, -1)).to eq [
      '{"file":"1_spec.rb","time":1}',
      '{"file":"2_spec.rb","time":2}',
    ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspeed-0.5.2 spec/models/rspeed/splitter/append_spec.rb