Sha256: e9649393c849fa071096fd2479d58f8a3e9c6762e4ce70ae2b2cbe5da1b6d035
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper.rb' require 'reek/smells' include Reek describe Smell, "camel case converter" do it "should convert camel case name" do Smell.convert_camel_case('LongParameterList').should == 'Long Parameter List' end it "should display correct name in report" do smell = LongMethod.new(self) smell.report.should match(/[#{smell.name}]/) end end describe Smell, ' in comparisons' do it 'should hash equal when the smell is the same' do UtilityFunction.new(self, 2).hash.should == UtilityFunction.new(self, 2).hash NestedIterators.new(self).hash.should == NestedIterators.new(self).hash end it 'should compare equal when the smell is the same' do UtilityFunction.new(self, 2).should == UtilityFunction.new(self, 2) NestedIterators.new(self).should == NestedIterators.new(self) end it 'should compare equal when using <=>' do (UtilityFunction.new(self, 2) <=> UtilityFunction.new(self, 2)).should == 0 (NestedIterators.new(self) <=> NestedIterators.new(self)).should == 0 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reek-0.3.0 | spec/reek/smell_spec.rb |