summaryrefslogtreecommitdiff
path: root/spec/unit/node_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* rename __path to __path__ and __node to __node__lcg/node-path-trackingLamont Granquist2016-10-251-21/+21
| | | | | | | | | | | | consistency with Unchain here: https://github.com/chef/chef/blob/master/lib/chef/decorator/unchain.rb#L23-L24 and with SimpleDelegator: https://ruby-doc.org/stdlib-2.1.0/libdoc/delegate/rdoc/SimpleDelegator.html#method-i-__getobj__ Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add tests from #4207Lamont Granquist2016-10-251-0/+19
| | | | | | | validates that we fixed the top_level_breadcrumb-state related bug which has been reported Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add specsLamont Granquist2016-10-251-0/+84
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5476 from tas50/copyrightsLamont Granquist2016-10-211-3/+3
|\ | | | | Fix copyrights and update a few more Opscode references to Chef
| * More Opscode -> Chef updatesTim Smith2016-10-201-3/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Attributes: add tests for regression in 12.0 fixed recentlyLamont Granquist2016-10-201-0/+28
|/ | | | | | | | | | | | | | | Tests for the issue that led up to https://github.com/chef/chef/issues/5447 The Hash tests actually pass against 12.13.37 so it appearly that only broke the Immutable array objects in 12.0. This both explains why we didn't have any existing tests that caught it, and why it went uncaught for so long. It also adds some ammunition to the argument that fixing this in 12.14.x was not a major breaking change to users that had been relying on the buggy 12.0 behavior. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5103 from chef/lcg/fix-5012Lamont Granquist2016-07-121-0/+6
|\ | | | | add back method_missing support to set_unless
| * fix mixup in the test titlesLamont Granquist2016-07-111-2/+2
| |
| * add back method_missing support to set_unlessLamont Granquist2016-07-111-0/+6
| | | | | | | | closes #5012
* | fix tests to go red on masterLamont Granquist2016-07-081-10/+12
| | | | | | | | its necessary to set the breadcrumb to something wrong first.
* | fix for #5094 12.12.13 node.default_unless issueLamont Granquist2016-07-081-0/+22
|/ | | | | | note that the node_spec test in this commit is not red on master so it ain't testing the right thing yet, but this fixes the issue in chef-shell...
* Attributes v1.1 changeslcg/attributes-v1.1Lamont Granquist2016-06-271-26/+115
| | | | | | | | | | | - fixes *_unless behavior and set_unless_value_present hack from Chef 12 - simplifies rm_* code - introduces functional read/write/unlink/exist? API - deprecates method_missing access to attributes for Chef 13 - deprecates set/set_unless aliases for Chef 14 - removes MultiMash mess that I wrote for Chef 13 https://github.com/chef/chef/pull/5029 for more details
* better chef+ruby rspec constraintsLamont Granquist2016-03-031-1/+1
| | | | | | | | lets us use Gem::Dependency constraints directly as rspec constraints for matching Chef::Version and RUBY_VERSION. copies some magic sauce from bundler that does something similar
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-5/+5
| | | | no enforced trailing comma on arguments...
* deal with 0.37.2 renamed copsLamont Granquist2016-02-181-27/+27
| | | | | | | | | | | | | | | 252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
* autofixing auto-inserted delimiterslcg/chefstyle-batchLamont Granquist2016-02-091-6/+6
|
* auto fixing some rubocopsLamont Granquist2016-02-091-6/+6
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-051-37/+37
| | | | | | | | | | | | | | | | | | | | | | 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
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/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-2/+2
|
* Use double quotes by defaultThom May2016-01-141-49/+49
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-28/+28
| | | | chefstyle -a fixed 1044 occurrances
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-25/+31
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* really always return an Arraylcg/fix-tags-and-set-unlessLamont Granquist2015-12-141-0/+12
|
* tags always an array; fix set_unlessLamont Granquist2015-12-141-1/+13
| | | | | | | previously if the node had a { normal: { tags: nil } } that we read since the key existed (but was nil) we would not initialize with an array. replacing the code with a call to node.set_unless revealed that set_unless was similarly buggy. fixed both issues by fixing set_unless.
* Merge pull request #4064 from josb/masterThom May2015-11-121-1/+1
|\ | | | | Use the initializer to avoid NoMethodError on nil.include?
| * Route all tags access through Chef::Node#{tags,tag}Jos Backus2015-10-201-1/+1
| | | | | | | | | | This should avoid node tags not being initialized properly to an empty Array.
* | Define == for node objectsDavid Bresson2015-10-241-0/+8
|/
* Populate node policyfile attrs from JSONdanielsdeleo2015-09-171-0/+8
|
* Add policyfile attrs to node create/savedanielsdeleo2015-09-171-0/+103
|
* Add policyfile attrs to node JSON when presentdanielsdeleo2015-09-171-0/+30
|
* Add policy_name and policy_group attrs to Node classdanielsdeleo2015-09-171-0/+72
|
* Set chef_environment in attributes JSONClaire McQuin2015-07-141-0/+7
|
* Only automatically set resources that do class X < Chef::Resource,jk/3524John Keiser2015-06-161-1/+1
| | | | not X = Class.new(Chef::Resource)
* deep_merge_cache fixes for bugs in 12.0.0Lamont Granquist2015-01-141-0/+31
| | | | | | | | In 12.0.0 we introduced a cache for the merged attributes for the top-level node attribute keys. This fixes this so that node['foo'] and node[:foo] are not cached separately. This also showed up in bugs as issues between node['foo'] access and node.foo access because node.foo is translated into node[:foo].
* Add specPhil Dibowitz2014-12-101-0/+34
|
* fix rspec truthy thingsLamont Granquist2014-11-081-6/+6
|
* fix autovivificationLamont Granquist2014-11-081-2/+10
|
* chef-12 attribute changesLamont Granquist2014-11-081-13/+313
| | | | | | - adding rm, rm_default, rm_normal, rm_override APIs - adding default!, normal! and override! APIs - changing force_default! and force_override! APIs
* Update to RSpec 3.Claire McQuin2014-10-291-181/+181
|
* Separate test for node.to_hash with empty run_list.Ivan Larionov2014-10-191-3/+4
|
* Empty run_list should result in empty array when using node.to_hash.Ivan Larionov2014-10-181-0/+3
|
* My local gemset was including the `json` gem, causing these tests to be ↵tyler-ball2014-10-071-1/+4
| | | | ineffective. Also made them more clear
* Trying to eradicate all traces of the JSON gem from Cheftyler-ball2014-10-071-0/+4
|
* Change attribute whitelist filter syntax to match OhaiClaire McQuin2014-05-151-23/+23
|
* add whitelist config options for attributes saved by the nodeClaire McQuin2014-05-151-3/+73
|
* Merge remote-tracking branch 'origin/master' into save-right-run-listThom May2014-03-041-12/+33
|\ | | | | | | | | Conflicts: lib/chef/client.rb
| * s/mock\(/double(/gLamont Granquist2014-01-291-4/+4
| |