Merged
Conversation
sugamasao
commented
Jul 7, 2020
|
|
||
| # 総計を計算する | ||
| # CSVへ出力する際、10,000,000 円以上は 9,999,999 を返す | ||
| def income_all_total_with_round |
Contributor
Author
There was a problem hiding this comment.
income_all_total メソッド自体は平均額の計算などでも利用しているので、丸める処理のみを行うメソッドを追加しています
wakasa51
approved these changes
Jul 7, 2020
| before do | ||
| allow(rec).to receive(:target_months).and_return(%i[apr may jun]) | ||
| end | ||
| context 'not round' do |
Member
There was a problem hiding this comment.
[nits] 個人的な意見ですが、 context には望む結果ではなく、条件的なものが入ると読みやすいかなと思います。
例えば、 when income_all_total is 9_999_999 or less や when income_all_total is more than 9_999_999 みたいな感じなど
Contributor
Author
There was a problem hiding this comment.
確かにそうですね。
メッセージ直しますので少々お待ちを 🙏
Contributor
Author
|
rspec内のcontextのメッセージを修正しました。 自分でも検討してみたのですが、例示していただいたメッセージが一番良かったのでそのまま使わせていただきました ☘️ |
This was referenced Jul 7, 2020
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://www.nenkin.go.jp/denshibenri/oshirase/zenpan/20190820.files/14.pdf
該当は項目36の総計欄です。
項目37の平均と同じように7桁へ丸める処理を追加しています。