Sha256: 3aa9fe6ea751e2f40d2860eb7e824b8698408c40f9fc2ca8bcb12c95e3951425

Contents?: true

Size: 544 Bytes

Versions: 39

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal = true

RSpec.describe :safe_join do
  link :safe_join, from: :ree_text

  it {
    expect(safe_join(["<p>foo</p>", "<p>bar</p>"], sep: "<br />")).to eq("&lt;p&gt;foo&lt;/p&gt;&lt;br /&gt;&lt;p&gt;bar&lt;/p&gt;")
    expect(safe_join(["a", ["b", "c"]], sep: ":")).to eq("a:b:c")
    expect(safe_join(['"a"', ["<b>", "<c>"]], sep: " <br/> ")).to eq("&quot;a&quot; &lt;br/&gt; &lt;b&gt; &lt;br/&gt; &lt;c&gt;")
    expect(safe_join(["a", "b"])).to eq("a$b")
    expect(safe_join(["a", "b"], sep: "|")).to eq("a|b")
  }
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
ree_lib-1.0.39 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.38 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.37 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.36 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.35 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.34 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.33 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.32 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.31 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.30 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.29 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.28 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.27 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.26 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.24 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.23 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.22 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.21 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.20 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb
ree_lib-1.0.19 lib/ree_lib/packages/ree_text/spec/ree_text/functions/safe_join_spec.rb