Skip to content

Commit

Permalink
add additional spec to String#convert_to_value to test multiline strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed May 5, 2016
1 parent 52cd0fe commit 966002a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/core_ext/string_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@
it "just returns the string if something goes wrong" do
expect("[.a,2,3]".convert_to_value).to eql "[.a,2,3]"
end

it "doesn't match multiline strings" do
expect("12345\n12345".convert_to_value).to eql "12345\n12345"
expect("5.123\n5.123".convert_to_value).to eql "5.123\n5.123"
expect("[0,1,2,3]\n[0,1,2,3]".convert_to_value).to eql "[0,1,2,3]\n[0,1,2,3]"
end
end

describe "hex_to_byte_string" do
Expand Down

0 comments on commit 966002a

Please sign in to comment.