-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathchallenge_spec.rb
More file actions
28 lines (21 loc) · 770 Bytes
/
Copy pathchallenge_spec.rb
File metadata and controls
28 lines (21 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require_relative 'solution'
def equal_digit_frequency?(n1, n2)
# raise NotImplementedError
end
RSpec.describe 'equal_digit_frequency?' do
it "'789' and '897' have the same digit frequency" do
expect(equal_digit_frequency?('789', '897')).to eq(true)
end
it "'123445' and '451243' have the same digit frequency" do
expect(equal_digit_frequency?('123445', '451243')).to eq(true)
end
it "'447' and '477' have different digit frequency" do
expect(equal_digit_frequency?('447', '477')).to eq(false)
end
it "'578' and '0' have different digit frequency" do
expect(equal_digit_frequency?('578', '0')).to eq(false)
end
it "'0' and '0' have the same digit frequency" do
expect(equal_digit_frequency?('0', '0')).to eq(true)
end
end