We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fcdc36 commit c630573Copy full SHA for c630573
spec/lib/canvas/checks/valid_json_check_spec.rb
@@ -15,11 +15,11 @@
15
it "adds an offense when a file contains invalid json" do
16
copy_example_directory("vagabond")
17
subject.run
18
- message = "unexpected token at 'This is an invalid custom type."
+ message_pattern = /Invalid JSON: .+ - \nunexpected \w+(?:: | at )'This is an invalid custom type\.\n'/
19
20
expect(subject.offenses).to match_array(
21
[
22
- have_attributes(message: include(message.squeeze("\n")))
+ have_attributes(message: match(message_pattern))
23
]
24
)
25
end
0 commit comments