Sha256: caadaf467332df202c35c51ae50d39ebbc405cb4723633cfe20ad18ce65f8d17

Contents?: true

Size: 568 Bytes

Versions: 5

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'
require 'rubycritic/core/smell'
require 'rubycritic/smells_status_setter'

describe RubyCritic::SmellsStatusSetter do
  describe '::smells' do
    before do
      @smell = RubyCritic::Smell.new(context: '#bar')
      @smells = [@smell]
    end

    it 'marks old smells' do
      RubyCritic::SmellsStatusSetter.set(@smells, @smells)
      @smell.status.must_equal :old
    end

    it 'marks new smells' do
      RubyCritic::SmellsStatusSetter.set([], @smells)
      @smell.status.must_equal :new
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubycritic-3.4.0 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.3.0 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.2.3 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.2.2 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.2.1 test/lib/rubycritic/smells_status_setter_test.rb