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