Sha256: b435acac5f26de58a68e346d2ae88e0ddc0c6e1cfac46eef73da7ad0e14528f5

Contents?: true

Size: 594 Bytes

Versions: 4

Compression:

Stored size: 594 Bytes

Contents

require 'test_helper'

class StringsParamTest < Test::Unit::TestCase
  include SproutTestCase

  context "a new StringsParam" do

    setup do
      @param = Sprout::Executable::Strings.new
      @param.name = "strings"
    end

    ['abcd', 1234, true].each do |value|
      should "throw with non-enumerable assignment of #{value}" do
        assert_raises Sprout::Errors::ExecutableError do
          @param.value = value
        end
      end
    end

    should "not escape spaces" do
      @param.value << "a b c"
      assert_equal '--strings+=a b c', @param.to_shell
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sprout-1.0.35.pre test/unit/strings_param_test.rb
sprout-1.0.32.pre test/unit/strings_param_test.rb
sprout-1.0.31.pre test/unit/strings_param_test.rb
sprout-1.0.29.pre test/unit/strings_param_test.rb