Commit Graph

5 Commits

Author SHA1 Message Date
Fabio Rehm 54656151cf Convert specs to RSpec 2.14.8 syntax with Transpec
This conversion is done by Transpec 1.10.2 with the following command:
    transpec test/unit/

* 507 conversions
    from: obj.should
      to: expect(obj).to

* 394 conversions
    from: == expected
      to: eq(expected)

* 260 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 85 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 25 conversions
    from: its(:attr) { }
      to: describe '#attr' do subject { super().attr }; it { } end

* 19 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 7 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 3 conversions
    from: Klass.any_instance.should_receive(:message)
      to: expect_any_instance_of(Klass).to receive(:message)
2014-03-14 12:02:07 -03:00
Ryan Uber a4e923bec7 Removed excess whitespace 2014-02-14 12:02:27 -08:00
Ryan Uber fff4f595c5 Added unit test for passing a single fixnum as an argument to the shell
provisioner
2014-02-14 11:53:17 -08:00
Ryan Uber 509e29043a Added handling of fixnum values for shell provisioner options both as the value
of `args` itself and as an element inside of an `args` array. Added validation
around passing in arrays for arguments. Just knowing that it is an array is not
enough, because arrays can contain any other type.
2014-02-14 11:47:36 -08:00
Paul Hinze fef60242b0 provisioners/shell: fix validation for args [GH-1949]
The logic change in 57d4775140 introduced
a bug where neither strings nor arrays provided as `args` for shell
provisioners would pass validation.

This fixes that problem along with a few extras:

- split out arg validation into a private method
- update comment describing valid args
- add a few unit tests around config validation
2013-11-28 19:54:10 -06:00