Sha256: b516a671574345f46e26c6d1a43fb7bb6cce29a117232803987c07e805c8bd22

Contents?: true

Size: 254 Bytes

Versions: 24

Compression:

Stored size: 254 Bytes

Contents

describe "String#%" do
  it "returns formatted string as same as Kernel#format" do
    ("%-5d" % 123).should == "123  "
  end

  it "can accept multiple arguments by passing them in an array" do
    ("%d %s" % [456, "foo"]).should == "456 foo"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
opal-0.5.5 spec/opal/core/string/format_spec.rb
opal-0.5.4 spec/corelib/string/format_spec.rb
opal-0.5.2 spec/corelib/string/format_spec.rb
opal-0.5.0 spec/corelib/string/format_spec.rb
opal-0.4.4 spec/rubyspec/core/string/format_spec.rb
opal-0.4.3 spec/rubyspec/core/string/format_spec.rb
opal-0.4.2 spec/rubyspec/core/string/format_spec.rb
opal-0.4.1 spec/rubyspec/core/string/format_spec.rb
opal-0.4.0 spec/rubyspec/core/string/format_spec.rb
opal-0.3.44 spec/rubyspec/core/string/format_spec.rb
opal-0.3.43 spec/rubyspec/core/string/format_spec.rb
opal-0.3.42 spec/core/string/format_spec.rb
opal-0.3.41 spec/core/string/format_spec.rb
opal-0.3.40 spec/core/string/format_spec.rb
opal-0.3.39 spec/core/string/format_spec.rb
opal-0.3.38 spec/core/string/format_spec.rb
opal-0.3.37 spec/core/string/format_spec.rb
opal-0.3.36 spec/core/string/format_spec.rb
opal-0.3.35 spec/core/string/format_spec.rb
opal-0.3.34 spec/core/string/format_spec.rb