Sha256: e0b1c0fc3a183f31aef3559bfa8ee02773eedfa46b4945aa85816cf56bf70785

Contents?: true

Size: 539 Bytes

Versions: 5

Compression:

Stored size: 539 Bytes

Contents

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-1.0.2 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-1.0.1 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-1.0.0 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.16 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.15 test/lib/rubycritic/smells_status_setter_test.rb