30 validate codesamples #38

Merged
merged 9 commits into from Sep 1, 2014

Conversation

Projects
None yet
4 participants
@madziaf
Contributor

madziaf commented Sep 1, 2014

created TestConverter and AtaruError

@madziaf

This comment has been minimized.

Show comment
Hide comment
@madziaf

madziaf Aug 27, 2014

Contributor

Here is an issue to discuss. If the code stays that way, the user will get from the test runner (minitest) the error message, that 'a' in not known.
Do we want the test runner to throw an error, or should there be a warning from ataru before?
related to #30

Here is an issue to discuss. If the code stays that way, the user will get from the test runner (minitest) the error message, that 'a' in not known.
Do we want the test runner to throw an error, or should there be a warning from ataru before?
related to #30

Magdalena
created AtaruError to catch StandardErrors if they occure and output
them with more info(md filename, code sample number). Created some more mock files.
@@ -5,6 +5,18 @@ def self.run_test_for_file(file_name)
kramdown_doc = MarkdownLoader.load_file(file_name)
#pulling an array of codespans/code samples from markdown document
code_samples = Traverser.codespans(kramdown_doc)
+
+ code_samples = code_samples.map do |sample|
+ p sample

This comment has been minimized.

@schultyy

schultyy Sep 1, 2014

Member

Is the debug output here on purpose? If not, then it should be removed :)

@schultyy

schultyy Sep 1, 2014

Member

Is the debug output here on purpose? If not, then it should be removed :)

nerdbabe added a commit that referenced this pull request Sep 1, 2014

@nerdbabe nerdbabe merged commit 55cba48 into master Sep 1, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@nerdbabe

This comment has been minimized.

Show comment
Hide comment
@nerdbabe

nerdbabe Sep 1, 2014

Member

solves issues #30

Member

nerdbabe commented Sep 1, 2014

solves issues #30

@nerdbabe nerdbabe deleted the 30-validate-codesamples branch Sep 1, 2014

+ return [:warning, code_sample]
+ end
+
+ before_match = code_sample.match(/(.*) #=>/)

This comment has been minimized.

@moonglum

This comment has been minimized.

Show comment
Hide comment
@moonglum

moonglum Sep 2, 2014

Nice 👍

moonglum commented Sep 2, 2014

Nice 👍

@nerdbabe nerdbabe referenced this pull request Sep 2, 2014

Closed

Validate Codesample #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment