Sha256: 5a10ac081fdd9599cff44c97189775bd42621e1390b106b52381318db1a697a5

Contents?: true

Size: 598 Bytes

Versions: 13

Compression:

Stored size: 598 Bytes

Contents

require 'test_helper'

class StringsParamTest < Test::Unit::TestCase
  include Sprout::TestHelper

  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

13 entries across 13 versions & 1 rubygems

Version Path
sprout-1.1.18.pre test/unit/strings_param_test.rb
sprout-1.1.17.pre test/unit/strings_param_test.rb
sprout-1.1.16.pre test/unit/strings_param_test.rb
sprout-1.1.15.pre test/unit/strings_param_test.rb
sprout-1.1.14.pre test/unit/strings_param_test.rb
sprout-1.1.13.pre test/unit/strings_param_test.rb
sprout-1.1.11.pre test/unit/strings_param_test.rb
sprout-1.1.10.pre test/unit/strings_param_test.rb
sprout-1.1.7.pre test/unit/strings_param_test.rb
sprout-1.1.5.pre test/unit/strings_param_test.rb
sprout-1.1.4.pre test/unit/strings_param_test.rb
sprout-1.1.3.pre test/unit/strings_param_test.rb
sprout-1.1.2.pre test/unit/strings_param_test.rb