Sha256: 2a5db00fbcb6922414f078890f11a3c5fa02d367e73dd82c7de41ed26ef7527c

Contents?: true

Size: 584 Bytes

Versions: 25

Compression:

Stored size: 584 Bytes

Contents

require 'spec_helper'

describe Stats do

  context 'with good stats' do
    let(:stats) { Stats.new(passed: 6, passed_with_warnings: 3, failed: 1, unknown: 0) }
    it { expect(stats.done?).to be false }
  end


  context 'with bad stats' do
    let(:stats) { Stats.new(passed: 1, passed_with_warnings: 0, failed: 4, unknown: 5) }
    it { expect(stats.done?).to be false }
  end

  describe '#to_h' do
    let(:hash) { {passed: 4, passed_with_warnings: 3, failed: 2, unknown: 1} }
    let(:stats) { Stats.new(hash) }

    it { expect(stats.to_h { |it| it }).to eq(hash) }
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mumuki-laboratory-5.7.0 spec/models/stats_spec.rb
mumuki-laboratory-5.6.3 spec/models/stats_spec.rb
mumuki-laboratory-5.6.2 spec/models/stats_spec.rb
mumuki-laboratory-5.6.1 spec/models/stats_spec.rb
mumuki-laboratory-5.6.0 spec/models/stats_spec.rb
mumuki-laboratory-5.5.0 spec/models/stats_spec.rb
mumuki-laboratory-5.4.0 spec/models/stats_spec.rb
mumuki-laboratory-5.3.0 spec/models/stats_spec.rb
mumuki-laboratory-5.2.1 spec/models/stats_spec.rb
mumuki-laboratory-5.2.0 spec/models/stats_spec.rb
mumuki-laboratory-5.1.1 spec/models/stats_spec.rb
mumuki-laboratory-5.1.0 spec/models/stats_spec.rb
mumuki-laboratory-5.0.12 spec/models/stats_spec.rb
mumuki-laboratory-5.0.11 spec/models/stats_spec.rb
mumuki-laboratory-5.0.10 spec/models/stats_spec.rb
mumuki-laboratory-5.0.9 spec/models/stats_spec.rb
mumuki-laboratory-5.0.8 spec/models/stats_spec.rb
mumuki-laboratory-5.0.7 spec/models/stats_spec.rb
mumuki-laboratory-5.0.6 spec/models/stats_spec.rb
mumuki-laboratory-5.0.5 spec/models/stats_spec.rb