Skip to content
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

Add test against template_content #1729

Merged
merged 3 commits into from
Sep 5, 2021
Merged

Conversation

takahashim
Copy link
Collaborator

#1727config-local.tex.erb にエラーがあった場合のテストです。

@takahashim
Copy link
Collaborator Author

ふむーん、2.4だと動かない感じですかね…?

@kmuto
Copy link
Owner

kmuto commented Sep 5, 2021

full_message がないんですね…。
Ruby 2.4を捨ててもいい気はしますが、Re:VIEW 5.3というマイナーアップで落とすかというとちょっとためらいがなくもないです。pdfmaker側のほうで RUBY_VERSION かdefinedを使って、 full_message / message 切り替えるようにしておきますかね。

…この判定だとテスト側も分けないといけない?

Copy link
Owner

@kmuto kmuto left a comment

Choose a reason for hiding this comment

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

Ruby 2.4では full_messageの代わりにmessageを書き出すようにしてみました。このときの出力は

template or configuration error: undefined local variable or method not_existed_method' for #ReVIEW::PDFMaker:0x0000562020b51990`

だったので、184行については

        assert_match(/undefined local variable or method `not_existed_method'/, error_msg)

とすればよさそうです。

@kmuto kmuto merged commit 37145c2 into coverimage-check Sep 5, 2021
@kmuto kmuto deleted the coverimage-check-test branch September 5, 2021 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants