Add rspect test case for 'create_gauge_hash' method

Add rspect test case for ‘create_gauge_hash’ method

for commit 5fed0e9b2ff53d8aaecae215fc423f3390123e10

diff --git a/spec/lib/internal_metric/custom_spec.rb b/spec/lib/internal_metric/custom_spec.rb
index ae1fc62..41866c1 100644
--- a/spec/lib/internal_metric/custom_spec.rb
+++ b/spec/lib/internal_metric/custom_spec.rb
@@ -2,21 +2,30 @@ require 'rails_helper'
 
 module DiscoursePrometheus::InternalMetric
   describe Custom do
+    let(:result_hash) do
+      {
+        name: "post_count",
+        labels: nil,
+        description: "Total number of posts",
+        type: "Gauge",
+        value: 120,
+        _type: "Custom"
+      }
+    end
+
     it "creates hash for Custom metric" do
       metric = Custom.new
       metric.name = "post_count"
       metric.description = "Total number of posts"
-      metric.type = "Guage"
+      metric.type = "Gauge"
       metric.value = 120
 
-      expect(metric.to_h).to eq(
-        name: "post_count",
-        labels: nil,
-        description: "Total number of posts",
-        type: "Guage",
-        value: 120,
-        _type: "Custom"
-      )
+      expect(metric.to_h).to eq(result_hash)
+    end
+
+    it "creates hash for Custom gauge type metric using class method" do
+      hash = Custom.create_gauge_hash("post_count", "Total number of posts", 120)
+      expect(hash).to eq(result_hash)
     end
   end
 end

GitHub sha: bff713cc