Sha256: cc9e9bcb3af44c483db0f97a817c9567ccb4b18e10c5329fbb033f8ba02aad3e

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

require 'spec_helper'

describe AnalDiffist::FlogParser do
  context 'analyzing a class' do
    before do
      file_parser = get_parser_for('smelly_file.rb')
      @problems = file_parser.problems
    end
    def get_parser_for(fixture_file)
      file_name = File.join(File.dirname(__FILE__), '../../fixtures/', fixture_file)
      AnalDiffist::FlogParser.new(file_name, 1.0)
    end
    it 'should have an entry for the test method with a non zero score' do
      duplication = @problems.detect {|p| p.context == 'SmellyFile#duplication'}
      duplication.score.should > 0
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
analdiffist-0.4.0 spec/lib/analdiffist/flog_parser_spec.rb
analdiffist-0.3.0 spec/lib/analdiffist/flog_parser_spec.rb
analdiffist-0.2.0 spec/lib/analdiffist/flog_parser_spec.rb