collectiveidea / json_spec

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

Can't call it without description #19

Closed eliaslevy closed 12 years ago

eliaslevy commented 12 years ago

Doing it { should matcher } with a json_spec matcher results in rspec 2.6.0 failing to test the spec with a message of RSpec expects the matcher to have a #description method.

crimsonknave commented 12 years ago

You can add description methods to the five matchers. I've created a Gist with the code (and my estimation of what the descriptions should be). I put the description additions in my spec_helper.rb file and everything worked for me.

I'm not sure how I'd write tests for the descriptions currently, or I'd submit a pull request.

crimsonknave commented 12 years ago

Descriptions have been added in version 0.8.1 (c8c7ea8f9ed4436c2e75dda944f26776e9707434). This issue can be closed.

eliaslevy commented 12 years ago

Much obliged.