collectiveidea / json_spec

Easily handle JSON in RSpec and Cucumber
rubygems.org/gems/json_spec
MIT License
919 stars 114 forks source link

Update tests to support RSpec 3.0.0.beta1 #60

Closed greggroth closed 10 years ago

greggroth commented 10 years ago

This bumps the RSpec version to 2.14.1 and updates the tests to use the expect syntax. RSpec 3.0 removes the should syntax, so this prepares the gem for supporting RSpec 3.0.

The test suite is green using RSpec 2.14.1 and RSpec 3.0.0.beta1.

More information about RSpec 3.0: http://myronmars.to/n/dev-blog/2013/11/rspec-2-99-and-3-0-betas-have-been-released

iRonin commented 10 years ago

+1

skalee commented 10 years ago

AFAIK RSpec 3 does not remove should syntax, it just requires it to be explicitly enabled. From the website you cited:

Using the old :should syntax without explicitly configuring it is deprecated. It will continue to work but will emit a deprecation warning in RSpec 3 if you do not explicitly enable it. (Sam Phippen)

And how to enable it is here: https://relishapp.com/rspec/rspec-expectations/v/3-0/docs/syntax-configuration (actually my pull request #71 tweaks configuration appropriately).

Apart from that, I support the idea to stick with just one syntax and disable another. I have nothing against any of them — the old one is slightly less powerful as it fails to work in some rare circumstances which are unlikely to happen in this project. I think that the only criterium which makes sense is the preference of who contributed the most, that is @laserlemon.

iRonin commented 10 years ago

My +1 was just about making json_spec compatible with Rspec 3; currently there are gem version conflicts.

skalee commented 10 years ago

Currently json_spec master is expected to support RSpec 3.0.0.beta1 and #71 to support beta2. If not, please say why because it's a bug.

laserlemon commented 10 years ago

Should now be updated to be compatible with both RSpec 2 and 3.