-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Charlotte Fereday Ruby Refresher #214
base: master
Are you sure you want to change the base?
Conversation
@@ -220,4 +224,11 @@ | |||
n = count_words_of_each_length_in_a_file('data/lorem.txt') || [] | |||
expect(Hash[n.sort]).to eq({1=>1, 2=>5, 3=>7, 4=>12, 5=>14, 6=>4, 7=>8, 8=>6, 9=>6, 10=>2, 11=>2, 12=>3}) | |||
end | |||
|
|||
it 'fizzbuzz_without_modulo(number)' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example has too many expectations [4/1].
@@ -194,6 +197,7 @@ | |||
expect(b).to eq 1.7320508075688772 | |||
end | |||
|
|||
#TODO come back to complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem.
@@ -166,6 +168,7 @@ | |||
expect(n).to eq 'The Lion the Witch and the Wardrobe' | |||
end | |||
|
|||
#TODO return to this to complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem.
@@ -136,6 +137,7 @@ | |||
expect(n).to eq 6 | |||
end | |||
|
|||
#TODO come back to this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem.
@@ -28,6 +28,7 @@ | |||
expect(n).to eq ['a', 'b', 'c'] | |||
end | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line detected.
end | ||
|
||
# count the number of words in a file | ||
#TODO come back to this one to complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
end | ||
|
||
# return true if a string contains any special characters | ||
# where 'special character' means anything apart from the letters | ||
# a-z (uppercase and lower) or numbers | ||
#TODO come back to this & complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
array = string.split | ||
new_array = [] | ||
array.each_with_index do |word, index| | ||
if index == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the return of the conditional for variable assignment and comparison.
Use index.zero? instead of index == 0.
# except 'a', 'and' and 'the' | ||
# *unless* they come at the start of the start of the string, e.g. | ||
# 'the lion the witch and the wardrobe' becomes | ||
# 'The Lion the Witch and the Wardrobe' | ||
#TODO create a more elegant solution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
end | ||
|
||
# get the domain name *without* the .com part, from an email address | ||
# so alex@makersacademy.com becomes makersacademy | ||
#TODO come back to this & complete it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after #.
No description provided.