Sha256: b9054105d6ba868953400ee0d51cdc073da8720f49263acf619a658fec7f438e

Contents?: true

Size: 636 Bytes

Versions: 6

Compression:

Stored size: 636 Bytes

Contents

require "test_helper"
require "rubycritic/smell"
require "rubycritic/smells_status_setter"

describe Rubycritic::SmellsStatusSetter do
  describe "#smelly_pathnames" do
    before do
      @smell = Rubycritic::Smell.new(:context => "#bar")
      @smelly_pathnames = { "file0.rb" => [@smell] }
    end

    it "marks old smells" do
      Rubycritic::SmellsStatusSetter.new(@smelly_pathnames, @smelly_pathnames).smelly_pathnames
      @smell.status.must_equal :old
    end

    it "marks new smells" do
      Rubycritic::SmellsStatusSetter.new({}, @smelly_pathnames).smelly_pathnames
      @smell.status.must_equal :new
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubycritic-0.0.7 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.6 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.5 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.4 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.3 test/lib/rubycritic/smells_status_setter_test.rb
rubycritic-0.0.2 test/lib/rubycritic/smells_status_setter_test.rb