Sha256: de815ceb1696254e5fc5f87e39ed12aaf5aee3fcb0659883e77d8ab5402381e8

Contents?: true

Size: 567 Bytes

Versions: 7

Compression:

Stored size: 567 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

7 entries across 7 versions & 1 rubygems

Version Path
rubycritic-3.2.0 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.1.3 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.1.2 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.1.1 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.1.0 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-3.0.0 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-2.9.4 test/lib/rubycritic/smells_status_setter_test.rb