Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/isogram/.meta/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3
4
16 changes: 15 additions & 1 deletion exercises/isogram/.meta/generator/isogram_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@ def workload
indent_lines(
[
"string = #{input.inspect}",
"#{assert} Isogram.is_isogram?(string)"
"#{assert} Isogram.isogram?(string), #{failure_message}"
], 4
)
end

private

def failure_message
%Q("Expected #{expected}, #{reason}")
end

def reason
"'#{input}' #{is_or_not} an isogram"
end

def is_or_not
expected ? 'is' : 'is not'
end

end
20 changes: 10 additions & 10 deletions exercises/isogram/isogram_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,55 @@ class IsogramTest < Minitest::Test
def test_empty_string
# skip
string = ""
assert Isogram.is_isogram?(string)
assert Isogram.isogram?(string), "Expected true, '' is an isogram"
end

def test_isogram_with_only_lower_case_characters
skip
string = "isogram"
assert Isogram.is_isogram?(string)
assert Isogram.isogram?(string), "Expected true, 'isogram' is an isogram"
end

def test_word_with_one_duplicated_character
skip
string = "eleven"
refute Isogram.is_isogram?(string)
refute Isogram.isogram?(string), "Expected false, 'eleven' is not an isogram"
end

def test_longest_reported_english_isogram
skip
string = "subdermatoglyphic"
assert Isogram.is_isogram?(string)
assert Isogram.isogram?(string), "Expected true, 'subdermatoglyphic' is an isogram"
end

def test_word_with_duplicated_character_in_mixed_case
skip
string = "Alphabet"
refute Isogram.is_isogram?(string)
refute Isogram.isogram?(string), "Expected false, 'Alphabet' is not an isogram"
end

def test_hypothetical_isogrammic_word_with_hyphen
skip
string = "thumbscrew-japingly"
assert Isogram.is_isogram?(string)
assert Isogram.isogram?(string), "Expected true, 'thumbscrew-japingly' is an isogram"
end

def test_isogram_with_duplicated_non_letter_character
skip
string = "Hjelmqvist-Gryb-Zock-Pfund-Wax"
assert Isogram.is_isogram?(string)
assert Isogram.isogram?(string), "Expected true, 'Hjelmqvist-Gryb-Zock-Pfund-Wax' is an isogram"
end

def test_made_up_name_that_is_an_isogram
skip
string = "Emily Jung Schwartzkopf"
assert Isogram.is_isogram?(string)
assert Isogram.isogram?(string), "Expected true, 'Emily Jung Schwartzkopf' is an isogram"
end

def test_duplicated_character_in_the_middle
skip
string = "accentor"
refute Isogram.is_isogram?(string)
refute Isogram.isogram?(string), "Expected false, 'accentor' is not an isogram"
end

# Problems in exercism evolve over time, as we find better ways to ask
Expand All @@ -77,6 +77,6 @@ def test_duplicated_character_in_the_middle

def test_bookkeeping
skip
assert_equal 3, BookKeeping::VERSION
assert_equal 4, BookKeeping::VERSION
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If messages are the only thing being changed, and not the tests themselves, then VERSION should not change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, removed the query part that is common in languages where the question mark cannot be used. So it is a good version bump.

end
end