spec/inspection_spec.rb in h3-3.4.4 vs spec/inspection_spec.rb in h3-3.5.0
- old
+ new
@@ -85,6 +85,38 @@
let(:result) { false }
it { is_expected.to eq(result) }
end
end
-end
\ No newline at end of file
+
+ describe ".max_face_count" do
+ let(:h3_index) { "8928308280fffff".to_i(16) }
+ let(:result) { 2 }
+
+ subject(:max_face_count) { H3.max_face_count(h3_index) }
+
+ it { is_expected.to eq(result) }
+
+ context "when the h3 index is a pentagon" do
+ let(:h3_index) { "821c07fffffffff".to_i(16) }
+ let(:result) { 5 }
+
+ it { is_expected.to eq(result) }
+ end
+ end
+
+ describe ".h3_faces" do
+ let(:h3_index) { "8928308280fffff".to_i(16) }
+ let(:result) { [7] }
+
+ subject(:max_face_count) { H3.h3_faces(h3_index) }
+
+ it { is_expected.to eq(result) }
+
+ context "when the h3 index is a pentagon" do
+ let(:h3_index) { "821c07fffffffff".to_i(16) }
+ let(:result) { [1, 2, 6, 7, 11] }
+
+ it { is_expected.to eq(result) }
+ end
+ end
+end