File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 99RSpec ::Core ::RakeTask . new ( :spec )  do  |t |
1010  t . pattern  =  "spec/**/*_spec.rb" 
1111  t . rspec_opts  = 
12-       "--format d --backtrace " 
12+       "--format d" 
1313  t . rspec_opts  += " --color"  if  !windows? 
1414  # t.ruby_opts="-w" 
1515end 
Original file line number Diff line number Diff line change @@ -12,19 +12,26 @@ def app
1212    @app  ||= InstallFest . new 
1313  end 
1414
15-   def  get!  *args 
16-     get  *args 
17-     assert  {  last_response . status  == 200  } 
18-   end 
19- 
2015  [ 'en' ,  'es' ] . each  do  |locale |
2116    describe  "in locale '#{ locale }  '"  do 
2217      Site . all ( locale ) . each  do  |site |
2318        describe  "#{ site . name }   pages..."  do 
2419          site . docs . each  do  |doc |
2520            it  "renders #{ doc . filename }  "  do 
26-               get!  "/#{ site . name }  /#{ doc . name }  " ,  locale : locale 
27-               assert  {  last_response . ok?  } 
21+               path  =  "/#{ site . name }  /#{ doc . name }  " 
22+               get  path ,  locale : locale 
23+               if  ( last_response . status  != 200 ) 
24+                 errors  =  last_response . errors 
25+                 meaningful_errors  =  errors . each_line . select  do  |l |
26+                   l . include?  path  or  l  !~ %r{^\t } 
27+                 end . join 
28+                 puts  "#{ path }  : #{ meaningful_errors }  " 
29+                 fail ( "Syntax errors in #{ path }   -- see above" ) 
30+               end 
31+ 
32+               last_response_status  =  last_response . status 
33+               assert  {  last_response_status  == 200  } 
34+ 
2835              if  doc . filename . end_with? ( '.step' ) 
2936                assert  {  last_response . body  !~ /FUZZY/  } 
3037              end 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments