Sha256: 3a0717c5a429d707830029ffe14214ad16730aa392832af9534787b3f0c81ce3

Contents?: true

Size: 1.02 KB

Versions: 17

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

describe StatusRenderingVerbosity do
  let(:results) { [{result: :passed, inspection: 'HasBinding', binding: 'foo'},
                   {result: :failed, inspection: 'HasBinding', binding: 'bar'}] }

  describe StatusRenderingVerbosity::Verbose do
    it { expect(StatusRenderingVerbosity::Verbose.visible_expectation_results(:passed_with_warnings, results)).to eq results }
  end

  describe StatusRenderingVerbosity::Standard do
    it { expect(StatusRenderingVerbosity::Standard.visible_expectation_results(:passed_with_warnings, results)).to eq ([
        {result: :failed, inspection: 'HasBinding', binding: 'bar'}]) }
    it { expect(StatusRenderingVerbosity::Standard.visible_expectation_results(:errored, results)).to eq [] }
  end

  describe StatusRenderingVerbosity::Silent do
    it { expect(StatusRenderingVerbosity::Silent.visible_expectation_results(:passed_with_warnings, results)).to be_empty }
    it { expect(StatusRenderingVerbosity::Silent.render_feedback?(Object.new)).to be false }

  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mumuki-laboratory-5.2.1 spec/models/verbosity_spec.rb
mumuki-laboratory-5.2.0 spec/models/verbosity_spec.rb
mumuki-laboratory-5.1.1 spec/models/verbosity_spec.rb
mumuki-laboratory-5.1.0 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.12 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.11 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.10 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.9 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.8 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.7 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.6 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.5 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.4 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.3 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.2 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.1 spec/models/verbosity_spec.rb
mumuki-laboratory-5.0.0 spec/models/verbosity_spec.rb