Conversation
| expect(File.exists?(preview)).to be_truthy | ||
|
|
||
| generated_css = File.read Dir.glob(File.join(testdir, "fontcustom", "*.css")).first | ||
| expect(generated_css.scan('"').count).to be 0 |
There was a problem hiding this comment.
Your assertions don't match the test. Can you add an assertion that confirms single quotes are present, rather than testing the lack of double quotes?
There was a problem hiding this comment.
The easiest way to assert that all " were replaced with ' is to assert there are no ". Of course that does not assert that there are any ', or even worse to assert they are replacing what was supposed to be " (is there an assertion actually for that in other specs?). I don't know how to assert that the right amount of ' were replaced, and whether they were put in the right places.
I don't know how to do that, except by parsing the generated css for a valid CSS along with the current assertion of no " present (over-engineered, otherwise would've done it already). Any other idea?
No description provided.