Sha256: 2656f355fee8f13f10c923d7237e733f3f53f1938626e50a5104e52e1471dd72
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' require 'reek/version' describe 'Reek version number' do it 'should reprot the correct value' do actual = `ruby -Ilib bin/reek --version`.split actual[0].should == 'reek' actual[1].should == Reek::VERSION::STRING end end describe 'Integration test:' do Dir['spec/samples/*.rb'].each do |source| describe source do before :each do @expected = IO.readlines(source.sub(/\.rb/, '.reek')) @expected.each {|line| line.chomp!} end it 'should report the correct smells' do actual = `ruby -Ilib bin/reek #{source} 2>/dev/null`.split(/\n/) @expected.zip(actual).each do |p| actual = p[1] ? p[1].chomp : p[1] actual.should == p[0] end end it 'should report the correct smells in smell order' do actual = `ruby -Ilib bin/reek --sort smell #{source} 2>/dev/null`.split(/\n/) @expected.sort.zip(actual).each do |p| actual = p[1] ? p[1].chomp : p[1] actual.should == p[0] end end end end end describe 'Reek source code:' do Dir['lib/**/*.rb'].each do |source| describe source do it 'should report no smells' do `ruby -Ilib bin/reek #{source}`.should == "\n" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reek-0.2.2 | spec/integration_spec.rb |