summaryrefslogtreecommitdiff
path: root/spec/unit/shell/shell_session_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix 4 copsLamont Granquist2019-07-051-6/+3
| | | | | | | | | | | | | | - Layout/MultilineMethodCallBraceLayout - Layout/ClosingParenthesisIndentation - Layout/IndentFirstArgument EnforcedStyle: consistent - Layout/BlockEndNewline the first of these autocorrected to horrible looking code which exposed that we really needed the other three as well, which also cleaned up a bunch of other terrible looking code. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-5/+5
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Work around rspec 3.8.0 issuesLamont Granquist2018-09-251-2/+3
| | | | | | | | | | | | | | | | | Problem is described in detail here: https://github.com/rspec/rspec-expectations/issues/1068#issuecomment-424580564 Note that this is self-inflicted damage and our pattern of having #to_hash on objects be called by #to_json and to produce a serialized 'flavor' of the object breaks what ruby's semantics are supposed to be and those should all be `#to_h` methods, and we should deprecate `#to_hash` but I imagine that will be a reasonably large breaking change (Although hopefully most of the use by users will be Node#to_hash which is entirely correct usage since that thing is actually a kind of glorified Hash-like monster). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-021-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-26/+26
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add the ability to inject log objectstm/inject_logThom May2018-03-191-1/+0
| | | | | | meaning that we can have inheritable metadata Signed-off-by: Thom May <thom@chef.io>
* Unit tests for json attribs and chef-shellbtm/chef-shell-jsonBryan McLellan2017-08-101-58/+82
| | | | | | | Minor refactor to newer rspec style, except for the last class which has really complex ordering so I gaveup. Signed-off-by: Bryan McLellan <btm@chef.io>
* Update Chef::Shell testsSalim Afiune2017-03-171-2/+33
| | | | Signed-off-by: Salim Afiune <afiune@chef.io>
* Attributes v1.1 changeslcg/attributes-v1.1Lamont Granquist2016-06-271-1/+1
| | | | | | | | | | | - 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
* autofixing whitespace copsLamont Granquist2016-02-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* 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"
* Use double quotes by defaultThom May2016-01-141-4/+4
| | | | | | | 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.
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-2/+2
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* Update to RSpec 3.Claire McQuin2014-10-291-24/+24
|
* Make FileVendor configuration specific to the two implementationsdanielsdeleo2014-07-301-0/+2
| | | | | | | | | | | | | | | | FileVendor previously was configured by storing a closure/anonymous function as a class instance variable. This had the following downsides: * The API was too general, which caused a lot of code repetition * The block was lazily evaluated, which hid errors and made testing more difficult * The closures captured references to classes with references to large data structures, which complicates GC. Since we've only ever had the same two implementations of FileVendor, we can encapsulate configuration of the FileVendor factory by wrapping each configuration option in a method. As a side benefit, arguments to these methods will be eagerly evaluated, which makes it easier to detect errors.
* [CHEF-5314] Add unit and fucntional specsRyan Cragun2014-05-201-2/+42
|
* remove some more deprecation warningsLamont Granquist2014-01-291-1/+1
|
* s/mock\(/double(/gLamont Granquist2014-01-291-2/+2
|
* s/stub!/stub/gLamont Granquist2014-01-291-6/+6
| | | | fix deprecation warnings
* [CHEF-2467] Add tests and fix grammar.Steven Danna2013-04-181-2/+15
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+141
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!