rubycritic 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubycritic.rb +4 -4
- data/lib/rubycritic/analysers/churn.rb +16 -0
- data/lib/rubycritic/analysers/flog.rb +1 -2
- data/lib/rubycritic/analysers_runner.rb +7 -7
- data/lib/rubycritic/quality_adapters/flog.rb +20 -0
- data/lib/rubycritic/report_generators/assets/javascripts/application.js +56 -0
- data/lib/rubycritic/report_generators/assets/javascripts/highcharts.src.js +17672 -0
- data/lib/rubycritic/report_generators/assets/stylesheets/application.css +5 -0
- data/lib/rubycritic/report_generators/overview_generator.rb +24 -0
- data/lib/rubycritic/report_generators/reporter.rb +11 -5
- data/lib/rubycritic/report_generators/templates/layouts/application.html.erb +4 -2
- data/lib/rubycritic/report_generators/templates/overview.html.erb +5 -0
- data/lib/rubycritic/report_generators/view_helpers.rb +4 -0
- data/lib/rubycritic/revision_comparator.rb +1 -3
- data/lib/rubycritic/smell_adapters/flay.rb +3 -2
- data/lib/rubycritic/smell_adapters/flog.rb +4 -2
- data/lib/rubycritic/smell_adapters/reek.rb +3 -2
- data/lib/rubycritic/source_control_systems/git.rb +4 -0
- data/lib/rubycritic/source_control_systems/source_control_system.rb +4 -0
- data/lib/rubycritic/turbulence.rb +32 -0
- data/lib/rubycritic/version.rb +1 -1
- data/test/lib/rubycritic/analysers/churn_test.rb +23 -0
- data/test/lib/rubycritic/analysers_runner_test.rb +3 -3
- data/test/lib/rubycritic/quality_adapters/flog_test.rb +18 -0
- data/test/lib/rubycritic/{metric_adapters/flay_adapter_test.rb → smell_adapters/flay_test.rb} +2 -4
- data/test/lib/rubycritic/{metric_adapters/flog_adapter_test.rb → smell_adapters/flog_test.rb} +3 -5
- data/test/lib/rubycritic/{metric_adapters/reek_adapter_test.rb → smell_adapters/reek_test.rb} +4 -7
- data/test/lib/rubycritic/turbulence_test.rb +27 -0
- data/test/samples/flog/smelly2.rb +11 -0
- metadata +22 -11
- data/lib/rubycritic/smells_aggregator.rb +0 -13
- data/test/lib/rubycritic/smells_aggregator_test.rb +0 -32
@@ -1,32 +0,0 @@
|
|
1
|
-
require "test_helper"
|
2
|
-
require "rubycritic/smells_aggregator"
|
3
|
-
|
4
|
-
describe Rubycritic::SmellsAggregator do
|
5
|
-
context "when analysing smelly files" do
|
6
|
-
before do
|
7
|
-
smell1 = Rubycritic::Smell.new
|
8
|
-
smell2 = Rubycritic::Smell.new
|
9
|
-
@smells = [smell2, smell1]
|
10
|
-
@smell_adapters = [stub(:smells => [smell1]), stub(:smells => [smell2])]
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "#smells" do
|
14
|
-
it "returns the smells found in those files" do
|
15
|
-
Rubycritic::SmellsAggregator.new(@smell_adapters).smells.must_equal @smells
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context "when analysing files with no smells" do
|
21
|
-
before do
|
22
|
-
@smells = []
|
23
|
-
@smell_adapters = [stub(:smells => @smells)]
|
24
|
-
end
|
25
|
-
|
26
|
-
describe "#smells" do
|
27
|
-
it "returns an empty array" do
|
28
|
-
Rubycritic::SmellsAggregator.new(@smell_adapters).smells.must_equal @smells
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|