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 6541765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:08:42+00:00 2026-05-25T11:08:42+00:00

When I used to run ‘rake test’ I would see either ‘.’ or ‘F’

  • 0

When I used to run ‘rake test’ I would see either ‘.’ or ‘F’ or ‘E’ for each test.
When all was well, the output was a line of ‘.’

Now, even though all my test are passing, I am seeing program output in the midst of the line of ‘.’

I am not sure the best way to post the output, but here is an initial offering:

perrys-MacBook-Pro:iway perry_mac$ rake test:functionals --trace
** Invoke test:functionals (first_time)
** Invoke test:prepare (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment 
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment 
** Execute db:schema:load
** Execute test:prepare
** Execute test:functionals
Loaded suite /Users/perry_mac/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/rake_test_loader
Started
.........................."Welcome joe : "
."Welcome joe : "
."Welcome joe : "
."Welcome joe : "
.................."Welcome bob : "
...........
Finished in 0.998462 seconds.

58 tests, 81 assertions, 0 failures, 0 errors, 0 skips

Test run options: --seed 15796

The line of code generating the output is:
app/views/layouts/application.html.erb

  <div id="nav">
      <% if current_user %>
            <% str= "Welcome " + current_user.username + " : "%>
            <%= p str %>
      <%= link_to "Edit Profile : ", edit_user_path(current_user.id)%>
      <%= link_to "Logout", :logout%>
      <% else %>
      <%= link_to "Register", new_user_path%> |
      <%= link_to "Login", :login %>
      <% end %>
  </div>

The “Welcome joe : ” and “Welcome bob : ” msgs are expected program output seen after a user successfully logs in. bob and joe are usernames created in a fixtures file. I can’t figure out why the msgs are now seen during ‘rake test’ I see the same behavior when –trace is not used as well. Please comment on A) why I see some program output and not the rest and B) Why am I seeing any at all?

  • 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-05-25T11:08:42+00:00Added an answer on May 25, 2026 at 11:08 am

    Grep for “puts” or other code that writes to stdout in your app or test code. Something is leaking data to stdout.

    It looks like your view template is sending the content to stdout as well as the view:

        <%= p str %>
    

    The p function sends the string to stdout and then returns the string. The <%= ERB directive injects the value into the page being rendered, so you were both printing it out to stdout/console and rendering it in the page. This caused it to appear on the console when you were running tests.

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

Sidebar

Related Questions

Is a new (or different) instance of TestCase object is used to run each
HI All Is there a version of Reshaper that can be used to run
So, the idea is that I would take the following code used to run
In real mode on x86, what instructions would need to be used to run
I have an Application in C#/Winforms that is basically used to run test for
I have a sql file test.sql used to run some SQL (create object /
I used to run web applications all the time on my laptop, no problems,
I used to run Tomcat separately on my machine. I had an Ant script
I have two batch files which is used to run a large C++ build,
Assuming Visual Studio.NET 2008 and MsTest are used to run unit tests. When a

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.