Sha256: 34835627beb717ec45e73c14daafa4f73b8b36b839853165d4571f09a15af199

Contents?: true

Size: 620 Bytes

Versions: 22

Compression:

Stored size: 620 Bytes

Contents

require File.dirname(__FILE__) + '/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

22 entries across 22 versions & 1 rubygems

Version Path
sprout-1.0.26.pre test/unit/strings_param_test.rb
sprout-1.0.25.pre test/unit/strings_param_test.rb
sprout-1.0.24.pre test/unit/strings_param_test.rb
sprout-1.0.23.pre test/unit/strings_param_test.rb
sprout-1.0.22.pre test/unit/strings_param_test.rb
sprout-1.0.20.pre test/unit/strings_param_test.rb
sprout-1.0.19.pre test/unit/strings_param_test.rb
sprout-1.0.18.pre test/unit/strings_param_test.rb
sprout-1.0.17.pre test/unit/strings_param_test.rb
sprout-1.0.16.pre test/unit/strings_param_test.rb
sprout-1.0.15.pre test/unit/strings_param_test.rb
sprout-1.0.14.pre test/unit/strings_param_test.rb
sprout-1.0.13.pre test/unit/strings_param_test.rb
sprout-1.0.11.pre test/unit/strings_param_test.rb
sprout-1.0.9.pre test/unit/strings_param_test.rb
sprout-1.0.8.pre test/unit/strings_param_test.rb
sprout-1.0.5.pre test/unit/strings_param_test.rb
sprout-1.0.4.pre test/unit/strings_param_test.rb
sprout-1.0.3.pre test/unit/strings_param_test.rb
sprout-1.0.2.pre test/unit/strings_param_test.rb