Sha256: 256441a7495efd0fa8141e94dddde25a91ca85ba06b8e23c2d29d48b0023622f

Contents?: true

Size: 599 Bytes

Versions: 6

Compression:

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

6 entries across 6 versions & 1 rubygems

Version Path
kevinrutherford-reek-1.1.3.3 spec/reek/smell_warning_spec.rb
kevinrutherford-reek-1.1.3.4 spec/reek/smell_warning_spec.rb
kevinrutherford-reek-1.1.3.5 spec/reek/smell_warning_spec.rb
kevinrutherford-reek-1.1.3.6 spec/reek/smell_warning_spec.rb
kevinrutherford-reek-1.1.3.7 spec/reek/smell_warning_spec.rb
kevinrutherford-reek-1.1.3.8 spec/reek/smell_warning_spec.rb