Sha256: 435be1e11e2ec29ae2d1b5167e06b40140d999784d3caf26fa73069b4b4b565c
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 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 content = <<-END method_name do puts 'test' end END @excellent.check_content(content) 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simplabs-excellent-1.2.1 | spec/checks/flog_block_check_spec.rb |