From: Ban Hoang Date: 2006-08-24T01:27:04+09:00 Subject: How do I strip off the extra double quote or white space in the string when using assert_equal method ------_=_NextPart_001_01C6C6D0.F74228DC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =20 Hi,=20 I try to read in an external file to array and compare them to the drop down list in our application. I got into the problem when comparing, the extra double quotes make the assertion result failed. Can anyone help me to make it work?=20 Thanks for your help,=20 ps . I posted this question on Nabble but it is pending without reason so I try to post it here hope it can go to the list users... =20 ************************ Below is the code:=20 ------------=20 arr =3D IO.readlines("dropList.csv") # read entire contents of the = file into a single array. Each index of the array is one line.=20 assert_equal([arr[0]], $ie.frame("top").select_list(:name, "site_id").getAllContents)=20 ------------------=20 This is the csv external file dropList.csv contain:=20 :: Select Site ::=20 !!Eastgate_Mall=20 -----------------------------=20 1) Failure:=20 test__02_DropDown_list_verified(TC_pulldownBoxVerified) [DropVerified_test.rb:45]:=20 <[":: Select Site ::,!!Eastgate_Mall,,,,,\n"]> expected but was=20 <[":: Select Site ::", "!!Eastgate_Mall"]>.=20 =20 =20 =20 ------_=_NextPart_001_01C6C6D0.F74228DC--