Sha256: b0b38fd771d8ae7481d160a9782f6a3028ad9e8a545d5ce40dcf55c7ab0ef2a5

Contents?: true

Size: 608 Bytes

Versions: 7

Compression:

Stored size: 608 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "ArrayExt" do
  it "should be able to make ago-strings" do
    arr = [1, 2]
    Knj::ArrayExt.force_no_cols(:arr => arr, :no => 1)
    raise "Expected length of 1 but got: #{arr.length}" if arr.length != 1
    raise "Expected element to be 1 but it wasnt: #{arr[0]}" if arr[0] != 1
    
    Knj::ArrayExt.force_no_cols(:arr => arr, :no => 3, :empty => "test")
    raise "Expected length of 3 but got: #{arr.lengtj}" if arr.length != 3
    raise "Expected element 2 to be 'test' but it wasnt: #{arr[2]}" if arr[2] != "test"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
knjrbfw-0.0.49 spec/arrayext_spec.rb
knjrbfw-0.0.48 spec/arrayext_spec.rb
knjrbfw-0.0.47 spec/arrayext_spec.rb
knjrbfw-0.0.46 spec/arrayext_spec.rb
knjrbfw-0.0.45 spec/arrayext_spec.rb
knjrbfw-0.0.44 spec/arrayext_spec.rb
knjrbfw-0.0.43 spec/arrayext_spec.rb