spec/models/rspeed/splitter/get_spec.rb in rspeed-0.4.0 vs spec/models/rspeed/splitter/get_spec.rb in rspeed-0.5.0

- old
+ new

@@ -1,9 +1,7 @@ # frozen_string_literal: true -require 'rails_helper' - RSpec.describe RSpeed::Splitter, '#get' do subject(:splitter) { described_class.new } let!(:redis) { redis_object } @@ -16,18 +14,18 @@ it 'returns all values' do expect(splitter.get('rspeed_*')).to eq [ { 'files' => [[1, '1_spec.rb'], [2, '2_spec.rb']], 'number' => 0, - 'total' => 3 + 'total' => 3, }, { 'files' => [[3, '3_spec.rb']], 'number' => 1, - 'total' => 3 - } + 'total' => 3, + }, ] end end context 'when normal pattern is given' do @@ -38,12 +36,12 @@ it 'returns all values from that key' do expect(splitter.get('pattern')).to eq [ { 'files' => [[1, '1_spec.rb'], [2, '2_spec.rb']], 'number' => 0, - 'total' => 3 - } + 'total' => 3, + }, ] end end context 'when pattern is rspeed' do @@ -53,11 +51,11 @@ end it 'executes the right fetch method' do expect(splitter.get('rspeed')).to eq [ '{"file":"2_spec.rb","time":2}', - '{"file":"1_spec.rb","time":1}' + '{"file":"1_spec.rb","time":1}', ] end end context 'when pattern is rspeed_tmp' do @@ -67,10 +65,10 @@ end it 'executes the right fetch method' do expect(splitter.get('rspeed_tmp')).to eq [ '{"file":"2_spec.rb","time":2}', - '{"file":"1_spec.rb","time":1}' + '{"file":"1_spec.rb","time":1}', ] end end end