kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
809 stars 95 forks source link

RSpec deprecation #109

Closed tallakt closed 9 years ago

tallakt commented 10 years ago

The RSpec convenience example gives a deprecation due to rspec moving from should to expect(...).to

Failures:

  1) AwlTool::Parser::Parser parses a single variable section
     Failure/Error: parser.var_section.should parse "VAR_OUTPUT // Key
word for output variable\nout1 : WORD;\nEND_VAR"
       expected VAR_SECTION to be able to parse "VAR_OUTPUT // Keyword
 for output variable\nout1 : WORD;\nEND_VAR"
     # ./spec/parser/parser_spec.rb:157:in `block (2 levels) in <top (
required)>'

Deprecation Warnings:

Using `should` from rspec-expectations' old `:should` syntax without e
xplicitly enabling the syntax is deprecated. Use the new `:expect` syn
tax or explicitly enable `:should` instead. Called from /cygdrive/c/pr
osjekt/awltool/spec/parser/parser_spec.rb:157:in `block (2 levels) in 
<top (required)>'.

If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

1 deprecation warning total

Finished in 0.004 seconds (files took 1.85 seconds to load)
1 example, 1 failure
tallakt commented 10 years ago

I have since made a pull request to fix this..

kschiess commented 10 years ago

See PR #110

kschiess commented 9 years ago

Is this still a problem on master? I think this might be fixed by a drive-by-commit that I have done myself. Can you check?

And in any case: Thanks for caring!

rubydesign commented 9 years ago

Hi, after having converted a project from should to expect syntax by hand, i found a cool automatic tool which actually worked. If you want (Kaspar) i could take this transformation as a backburner and do the transformation over the space of a month or so

kschiess commented 9 years ago

I don't want to go all the way to rspecs new ridiculous syntax. If the specs don't warn about deprecated syntax, that's enough for now. Migration path for this project is probably going to include 'ae' for assertions, since the rspec project has proven to be misguided.

rubydesign commented 9 years ago

strong words, but your project, fair enough

kschiess commented 9 years ago

Back to my original question: Do you still get deprecation warnings when you use the current master for your project?

tallakt commented 9 years ago

Sorry for the delay. I dont have time to recheck this right now. I had a look, but basically I have installed my patched parslet, so I would need to reinstall parslet from github master. Will do this eventually. ~2-3 days and I'm there