dohtest 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/doh/test/master_runner.rb +1 -1
 - data/lib/doh/test/stream_output.rb +7 -1
 - metadata +2 -2
 
| 
         @@ -19,7 +19,7 @@ class MasterRunner 
     | 
|
| 
       19 
19 
     | 
    
         
             
                end
         
     | 
| 
       20 
20 
     | 
    
         
             
                if @config[:post_test_callback]
         
     | 
| 
       21 
21 
     | 
    
         
             
                  if (!@config[:post_test_callback].call())
         
     | 
| 
       22 
     | 
    
         
            -
                    @output. 
     | 
| 
      
 22 
     | 
    
         
            +
                    @output.callback_failed(@config[:post_test_callback].inspect)
         
     | 
| 
       23 
23 
     | 
    
         
             
                  end
         
     | 
| 
       24 
24 
     | 
    
         
             
                end
         
     | 
| 
       25 
25 
     | 
    
         
             
                @output.run_end(Time.now - start_time)
         
     | 
| 
         @@ -9,6 +9,7 @@ class StreamOutput 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              def initialize
         
     | 
| 
       11 
11 
     | 
    
         
             
                @error_count = @groups_ran = @groups_skipped = @tests_ran = @tests_skipped = @assertions_failed = @assertions_passed = 0
         
     | 
| 
      
 12 
     | 
    
         
            +
                @callback_succeeded = true
         
     | 
| 
       12 
13 
     | 
    
         
             
                @badness = Set.new
         
     | 
| 
       13 
14 
     | 
    
         
             
              end
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
         @@ -57,7 +58,7 @@ class StreamOutput 
     | 
|
| 
       57 
58 
     | 
    
         
             
                  assertion_str = "#{total_assertions} assertions: #@assertions_passed passed, #{failed_str}"
         
     | 
| 
       58 
59 
     | 
    
         
             
                end
         
     | 
| 
       59 
60 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
                success = (total_assertions > 0) && (@error_count == 0) && (@assertions_failed == 0)
         
     | 
| 
      
 61 
     | 
    
         
            +
                success = (total_assertions > 0) && (@error_count == 0) && (@assertions_failed == 0) && @callback_succeeded
         
     | 
| 
       61 
62 
     | 
    
         | 
| 
       62 
63 
     | 
    
         
             
                msg = "#{error_str}; #{group_str}; #{test_str}; #{assertion_str}"
         
     | 
| 
       63 
64 
     | 
    
         
             
                msg = colorize(:success, msg) if success
         
     | 
| 
         @@ -106,6 +107,11 @@ class StreamOutput 
     | 
|
| 
       106 
107 
     | 
    
         
             
                display_badness(group_name, test_name, failure)
         
     | 
| 
       107 
108 
     | 
    
         
             
              end
         
     | 
| 
       108 
109 
     | 
    
         | 
| 
      
 110 
     | 
    
         
            +
              def callback_failed(test_name)
         
     | 
| 
      
 111 
     | 
    
         
            +
                @callback_succeeded = false
         
     | 
| 
      
 112 
     | 
    
         
            +
                warn colorize(:error, "callback #{test_name} failed")
         
     | 
| 
      
 113 
     | 
    
         
            +
              end
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
       109 
115 
     | 
    
         
             
              def assertion_passed(group_name, test_name)
         
     | 
| 
       110 
116 
     | 
    
         
             
                @assertions_passed += 1
         
     | 
| 
       111 
117 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dohtest
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.14
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -10,7 +10,7 @@ authors: 
     | 
|
| 
       10 
10 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       11 
11 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       12 
12 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       13 
     | 
    
         
            -
            date: 2013-04- 
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2013-04-12 00:00:00.000000000 Z
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies:
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       16 
16 
     | 
    
         
             
              name: dohroot
         
     |