diff --git a/test/lib/rubycritic/learning/churn_gem_learning_test.rb b/test/lib/rubycritic/learning/churn_gem_learning_test.rb index 3c8ed574..3cce9d6e 100644 --- a/test/lib/rubycritic/learning/churn_gem_learning_test.rb +++ b/test/lib/rubycritic/learning/churn_gem_learning_test.rb @@ -13,11 +13,14 @@ } Churn::GitAnalyzer.stubs(:supported?).returns(true) churn_calculator = Churn::ChurnCalculator.new(config) + churn_calculator.stubs(:parse_log_for_changes).returns([['file.rb', 4], ['less.rb', 1]]) + churn_calculator.stubs(:parse_log_for_revision_changes).returns(['revision']) + report = churn_calculator.report(false) changes = report[:churn][:changes].first - assert_equal 'CHANGELOG.md', changes[:file_path] + assert_equal 'file.rb', changes[:file_path] assert_predicate changes[:times_changed], :positive? end end