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 single quotes option #336

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants