Skip to content

Commit

Permalink
fix: added some more set up that I missed 🤦.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Dec 8, 2024
1 parent ff89dd2 commit 1ab8581
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/lib/rubycritic/learning/churn_gem_learning_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1ab8581

Please sign in to comment.