Sha256: 0d65af2affdd7c32e63bb7a3401558cf9941b3009343d491f35f307026bfa843
Contents?: true
Size: 784 Bytes
Versions: 1
Compression:
Stored size: 784 Bytes
Contents
require "analysers_test_helper" require "rubycritic/analysers/stats" describe Rubycritic::Analyser::Stats do context "when a file contains Ruby code" do it "calculates the number of methods of each file and adds it to analysed_files" do analysed_file = AnalysedFileDouble.new(:path => "test/samples/stats/example.rb") Rubycritic::Analyser::Stats.new([analysed_file]).run analysed_file.methods_count.must_equal 2 end end context "when a file is empty" do it "calculates the number of methods as 0, adding it to analysed_files" do analysed_file = AnalysedFileDouble.new(:path => "test/samples/stats/empty_example.rb") Rubycritic::Analyser::Stats.new([analysed_file]).run analysed_file.methods_count.must_equal 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubycritic-1.0.0 | test/lib/rubycritic/analysers/stats_test.rb |