-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec8c38c
commit a934b7e
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--color | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require './app/app' | ||
|
||
RSpec.describe KanaHangulApp, "#furigana" do | ||
context "with kana bases" do | ||
it "converts base kanas to furigana" do | ||
app = KanaHangulApp.new | ||
string = "色は匂へど 散りぬるを 我が世誰ぞ 常ならむ 有為の奥山 今日越えて 浅き夢見じ 酔ひもせず" | ||
converted_string = app.convert_to_furigana(string) | ||
expected_string = "しょくはにおへど ちりぬるを わがよだれぞ つねならむ ゆういのおくやま きょうこえて あさきゆめみじ すいひもせず" | ||
expect(converted_string).to eq expected_string | ||
end | ||
|
||
it "converts base kanas to hangul" do | ||
app = KanaHangulApp.new | ||
string = "色は匂へど 散りぬるを 我が世誰ぞ 常ならむ 有為の奥山 今日越えて 浅き夢見じ 酔ひもせず" | ||
converted_string = app.convert_kana_to_hangul(string) | ||
expected_string = "쇼쿠하니오헤도 치리누루오 와가요다레조 츠네나라무 유우이노오쿠야마 쿄우코에테 아사키유메미지 스이히모세즈" | ||
expect(converted_string).to eq expected_string | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
RSpec.configure do |config| | ||
config.expect_with :rspec do |expectations| | ||
expectations.include_chain_clauses_in_custom_matcher_descriptions = true | ||
end | ||
|
||
config.mock_with :rspec do |mocks| | ||
mocks.verify_partial_doubles = true | ||
end | ||
|
||
end |