thekompanee / fuubar

The instafailing RSpec progress bar formatter
http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
MIT License
955 stars 65 forks source link

fuubar doesn't work in conjunction with the documentation formatter #95

Closed thedrow closed 8 years ago

thedrow commented 8 years ago

This is the output I'm getting.

Randomized with seed 18382

Randomized with seed 18382
 0/46 |>                                                                                                                                                                                                                     |  ETA: ??:??:??
Order
  Modifications
    should update order's delivery_time
    should NOT update order's delivery_time                                                                                                                                                                                  |  ETA: 00:29:15
  pick_resolution_for_seller                                                                                                                                                                                                 |  ETA: 00:14:11
    should return incomplete for waiting_for_reqs status
    should return inprogress for in_progress status                                                                                                                                                                          |  ETA: 00:09:23
    should return completed_and_clearing for completed status                                                                                                                                                                |  ETA: 00:07:02
    should return dispute_by_seller for mutual_cancellation_requested_by_seller status                                                                                                                                       |  ETA: 00:05:37
    should return late============>                                                                                                                                                                                          |  ETA: 00:04:39
    should return inprogress_after_mutual_request for in_progress status, after mutual cancellation requested                                                                                                                |  ETA: 00:03:59
    should return cancelled for seller_cancelled status                                                                                                                                                                      |  ETA: 00:03:28
    should return very_late for late_delivery_no_res status                                                                                                                                                                  |  ETA: 00:03:05
    should return dispute_after_completed for mutual_cancellation_requested_by_seller status, when the order completed                                                                                                       |  ETA: 00:02:46
    should return completed_and_cleared for completed status                                                                                                                                                                 |  ETA: 00:02:30
    should return delivered for delivered status===============>                                                                                                                                                             |  ETA: 00:02:17
    should return dispute_by_buyer for mutual_cancellation_requested_by_buyer status                                                                                                                                         |  ETA: 00:02:06
    should return cancelled for cancelled_by_mutual_agreement==========>                                                                                                                                                     |  ETA: 00:01:58
    should return rejected for rejected status=============================>                                                                                                                                                 |  ETA: 00:01:49
  is_rating_delayed?====================== 34 ==================================>                                                                                                                                            |  ETA: 00:01:42
    when the rater is the buyer
      should return false when delivery was in the last 30 days
      should return true when delivery was over 30 days ago=========================>                                                                                                                                        |  ETA: 00:01:35
      should return false when the order was not delivered yet============================>                                                                                                                                  |  ETA: 00:01:28
    when the rater is the seller================= 41 =========================================>                                                                                                                              |  ETA: 00:01:23
      should return false when delivery was over 30 days ago but the buyer submitted a review less than 7 days ago
      should return false when delivery was in the last 30 days====================================>                                                                                                                         |  ETA: 00:01:19
      should return false when the order was not delivered yet=========================================>                                                                                                                     |  ETA: 00:01:14
      should return true when delivery was over 30 days ago and the buyer did not submit a review==========>                                                                                                                 |  ETA: 00:01:09
      should return true when delivery was over 30 days ago and the buyer already submitted a review more than 7 days ago                                                                                                    |  ETA: 00:01:05
  schedule ga events========================================= 52 =====================================================>                                                                                                      |  ETA: 00:01:02
    should generate ecommerce data for ftb
    should generate ecommerce data for non ftb================= 54 =======================================================>                                                                                                  |  ETA: 00:00:57
  pick_resolution_for_buyer====================================== 56 =========================================================>                                                                                              |  ETA: 00:00:53
    should return late_high_rating for late_delivery status, when seller rating is high
    should return rejected_old for rejected status updated before 2 days ago======================================================>                                                                                          |  ETA: 00:00:49
    should return dispute_by_seller for mutual_cancellation_requested_by_seller status=================================================>                                                                                     |  ETA: 00:00:46
    should return completed_with_feedback for completed status, when rating exists===========================================================>                                                                               |  ETA: 00:00:42
    should return cancelled for seller_cancelled status=================== 65 ===================================================================>                                                                           |  ETA: 00:00:39
    should return completed_no_feedback for completed status================= 67 =====================================================================>                                                                      |  ETA: 00:00:36
    should return very_late for late_delivery_no_res status==================== 69 =======================================================================>                                                                  |  ETA: 00:00:33
    should return blocked_seller for active, not delivered order when  the seller is blocked==================================================================>                                                              |  ETA: 00:00:30
    should return incomplete for waiting_for_reqs status=========================== 73 ===========================================================================>                                                          |  ETA: 00:00:28
    should return incomplete for waiting_for_reqs status============================== 76 ===============================================================================>                                                   |  ETA: 00:00:25
    should return late_low_rating for late_delivery status, when seller rating is low=== 78 =================================================================================>                                               |  ETA: 00:00:22
    should return dispute_by_buyer for mutual_cancellation_requested_by_buyer status====== 80 ===================================================================================>                                           |  ETA: 00:00:20
    should return cancelled for cancelled order, when the seller is blocked================= 82 =====================================================================================>                                       |  ETA: 00:00:18
    should return cancelled for cancelled_by_mutual_agreement================================== 84 =======================================================================================>                                  |  ETA: 00:00:15
    should return dispute_after_completed for mutual_cancellation_requested_by_seller status, when the order completed========================================================================>                              |  ETA: 00:00:13
    should return rejected_new for rejected status updated in last 2 days=========================== 89 ============================================================================================>                        |  ETA: 00:00:11
  sends an email====================================================================================== 91 ==============================================================================================>                    |  ETA: 00:00:09
    sends 'thank you' email and 'sumbit reqs' email when in status 'waiting_for_reqs'
    sends 'thank you' emails to buyer and seller when in progress======================================= 93 =================================================================================================>               |  ETA: 00:00:06
  Extras================================================================================================== 95 ===================================================================================================>           |  ETA: 00:00:04
    without extra-fast should set has_fast_delivery? to false
    with extra-fast should set has_fast_delivery? to true=================================================== 97 =====================================================================================================>       |  ETA: 00:00:02
 46/46 |======================================================================================================= 100 ========================================================================================================>| Time: 00:01:32

Finished in 1 minute 32.67 seconds (files took 12.59 seconds to load)
46 examples, 0 failures

Finished in 1 minute 32.67 seconds (files took 12.59 seconds to load)
46 examples, 0 failures

Randomized with seed 18382

Randomized with seed 18382

I expect fuubar to keep the progress bar at the end of the output and to not print the test results twice. Is there any way we can easily achieve this?

jfelchner commented 8 years ago

@thedrow in a word: no. There is a way to do this if you were to write a custom formatter. ruby-progressbar has a log method that will clear the bar, write the message and then redraw the bar on the next line, so with a custom formatter, you can achieve this.

But not just by calling two formatters in the rspec command.

thedrow commented 8 years ago

So if I were to provide one, it'd be using a different gem?

jfelchner commented 8 years ago

@thedrow you can have a custom formatter class that's just inside your app if you want. You don't need a separate gem if you don't want. Your other option would be to fork fuubar, look at how the Documentation formatter works and merge the two.

github-actions[bot] commented 3 years ago

This issue has been closed automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.