Sha256: 5909bb5e8859c353eeb46022b50a94463d9a5d50bc4c38f0ad7a267b5c6b92c4
Contents?: true
Size: 763 Bytes
Versions: 15
Compression:
Stored size: 763 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Simplabs::Excellent::Checks::FlogClassCheck do before do @excellent = Simplabs::Excellent::Runner.new(Simplabs::Excellent::Checks::FlogClassCheck.new({ :threshold => 0 })) end describe '#evaluate' do it 'should calculate the score correctly' do code = <<-END class User < ActiveRecord::Base has_many :projects end END @excellent.check_code(code) warnings = @excellent.warnings warnings.should_not be_empty warnings[0].info.should == { :class => 'User', :score => 1 } warnings[0].line_number.should == 1 warnings[0].message.should == "User has flog score of 1." end end end
Version data entries
15 entries across 15 versions & 2 rubygems