Sha256: 5a5dbb96057350050305f787fb838111ea9d4993da2abf6b39adb8d5aaaa5346

Contents?: true

Size: 602 Bytes

Versions: 15

Compression:

Stored size: 602 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

require 'reek/smells/smells'

include Reek

describe SmellWarning, ' in comparisons' do
  before :each do
    @first = SmellWarning.new(Smells::FeatureEnvy.new, "self", "self")
    @second = SmellWarning.new(Smells::FeatureEnvy.new, "self", "self")
  end

  it 'should hash equal when the smell is the same' do
    @first.hash.should == @second.hash
  end

  it 'should compare equal when the smell is the same' do
    @first.should == @second
  end

  it 'should compare equal when using <=>' do
    (@first <=> @second).should == 0
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
kevinrutherford-reek-0.3.1.4 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-0.3.1.5 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-0.3.1.6 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.0.0 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.0.1 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.1.1 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.1.2.1 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.1.2 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.1.3.1 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.1.3.2 spec/reek/smells/smell_spec.rb
kevinrutherford-reek-1.1.3 spec/reek/smells/smell_spec.rb
teksymmetry-reek-1.1.3.1 spec/reek/smells/smell_spec.rb
teksymmetry-reek-1.1.3.2 spec/reek/smells/smell_spec.rb
reek-1.1.3 spec/reek/smells/smell_spec.rb
reek-1.0.0 spec/reek/smells/smell_spec.rb