Skip to content

Conversation

@AlaaSarhan
Copy link

No description provided.

@AlaaSarhan AlaaSarhan closed this Jun 26, 2017
@AlaaSarhan AlaaSarhan reopened this Jun 26, 2017
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

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?

Copy link
Author

@AlaaSarhan AlaaSarhan Jul 13, 2017

Choose a reason for hiding this comment

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

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?

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