summaryrefslogtreecommitdiff
path: root/spec/unit/json_compat_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Kill JSON auto inflate with firetm/remove_json_autoinflateThom May2017-03-141-32/+0
| | | | Signed-off-by: Thom May <thom@chef.io>
* autofixing whitespace copsLamont Granquist2016-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* ensure unit tests are correctThom May2016-01-181-0/+7
|
* Use double quotes by defaultThom May2016-01-141-7/+7
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* Rewrite nested json test to not use stackjdm/json-nested-testJay Mundrawala2015-07-171-3/+4
| | | | | | | | | | | | | | | | | | | | Freebsd 10.1 i386 testers keep getting: ``` /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `load': stack level too deep (SystemStackError) from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke' from /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/exe/rspec:4:in `<top (required)>' from /opt/chef/embedded/bin/rspec:23:in `load' from /opt/chef/embedded/bin/rspec:23:in `<main>' ``` We seem to keep changing the depth of the json object. Instead, let's just not do it on the stack.
* Only automatically set resources that do class X < Chef::Resource,jk/3524John Keiser2015-06-161-1/+1
| | | | not X = Class.new(Chef::Resource)
* Reduce size of nested JSON test to 252 deepbtm/lower-json-nest-testsBryan McLellan2015-04-201-6/+6
| | | | | | I got confused running git on the tester with my last commit for #3101. This should clean it up.
* Reduce size of json nested entriesBryan McLellan2015-04-151-20/+7
| | | | | | | | On FreeBSD 10.1 i386 we're seeing rspec 3.2.2 raise SystemStackError if the expect line has a nested hash of 255 levels. I'm going to guess we don't even need this many. I lowered this test from 1000 to 300 arbitrarily some time ago. Fixes #3101
* Adding back `require 'json'` to prevent breaking consumers who currently use ↵tball/yajl-replace-jsontyler-ball2014-10-081-3/+4
| | | | Hash.to_json in their cookbooks
* My local gemset was including the `json` gem, causing these tests to be ↵tyler-ball2014-10-071-1/+1
| | | | ineffective. Also made them more clear
* Trying to eradicate all traces of the JSON gem from Cheftyler-ball2014-10-071-2/+11
|
* add JSONCompat test for parsing JSON commentsLamont Granquist2014-08-131-1/+17
|
* fix specs broken due to JSON monkeypatching issuesLamont Granquist2014-08-111-1/+1
| | | | yajl/ffi-yajl vs JSON whitespace issues
* add json pretty print tests to some knife show commandsLamont Granquist2014-08-091-16/+31
|
* CHEF-1292 Lower json stack depth tests to 301Bryan McLellan2013-02-121-7/+7
| | | | | 1001 was causing stack level too deep errors on 1.8.7. This is still a huge stack depth and 1001 was arbitrary.
* Add a dummy Chef::Sandbox class back inChristopher Maier2012-11-281-0/+8
| | | | This allows Chef 11 clients to interact with Chef 10 servers (specifically, to upload cookbooks) without crashing.
* Add test to verify "auto-inflation" of JSON into Ruby classesChristopher Maier2012-11-281-0/+8
|
* Rename so RSpec will pick the file up and run the testsChristopher Maier2012-11-281-0/+53