From 1e052af3c1c9ae13c9166f09105771b9b10e70a0 Mon Sep 17 00:00:00 2001 From: Juan Vasquez Date: Fri, 9 Sep 2022 16:19:01 -0500 Subject: [PATCH] Stub churn --- test/lib/skunk/rubycritic/analysed_module_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/lib/skunk/rubycritic/analysed_module_test.rb b/test/lib/skunk/rubycritic/analysed_module_test.rb index 98ba1bf..3c108fb 100644 --- a/test/lib/skunk/rubycritic/analysed_module_test.rb +++ b/test/lib/skunk/rubycritic/analysed_module_test.rb @@ -60,15 +60,17 @@ { file: "samples/rubycritic/analysed_module.rb", skunk_score: 58.88, - churn_times_cost: 2.36, - churn: 4, + churn_times_cost: 2.94, + churn: 5, cost: 0.59, coverage: 0.0 } end it "returns a hash with all the attributes and values" do - _(@analysed_module.to_hash).must_equal result + @analysed_module.stub(:churn, 5) do + _(@analysed_module.to_hash).must_equal result + end end end end