Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7978913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:37:19+00:00 2026-06-04T09:37:19+00:00

My test started failing because I added a debugger after an XML expected block.

  • 0

My test started failing because I added a debugger after an XML expected block. Now it produces a single \n at the end of the statement that fails my test. And I can’t seem to get rid of it anyway I delete or move around my text.

Then I wrote this to make it pass :

      expected = <<-XML
    <?xml version="1.0" ?>
    <?qbxml version="5.0" ?>
    <QBXML>
      <QBXMLMsgsRq onError="continueOnError">
      </QBXMLMsgsRq>
    </QBXML>
    XML
  assert_equal expected.gsub(/\n/,'').gsub(' ',''), result.gsub(/\n/,'').gsub(' ','')
  #assert_equal expected.strip, result

Otherwise the commented out one used to work. Is there some dumb obvious sense I’m missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:37:21+00:00Added an answer on June 4, 2026 at 9:37 am

    I would not compare strings, it just sucks.

    Instead I would compare the object representations.

    Try to use: Hash#from_xml and compare the hashes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently upgraded a 1.3.6 application to Grails2. My test cases have started failing
I have a cucumber step that recently started failing when an &nbsp; was added
I am getting started with the notion of test-driven development, and kind of failing
We had a test project that started out as MbUnit v3 / Gallio but
I'm writing an application and started to test my domain model entities. If I
Since I started to develop in a test/behavior driven style, I appreciated the ability
I just started using the MVCContrib grid in a test project. I'm having a
I'm getting started with Selenium IDE and trying to test a webapp that's full
I'm writing a test to verify location services are started when a button click
So, I started to build a small test application to test lambda expressions. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.