Sorry, here the right output : 

Failures:                                                                       
                                                                                
                                                                                
                                 
                                                                                
                                                                                
                                                                                
                                 
  1) Admin should respond to #name                                              
                                                                                
                                                                                
                                 
     Failure/Error: it { is_expected.to respond_to(:name) }
                                                                                
                                                                                
                                                      
       expected "Admin" to respond to :name
                                                                                
                                                                                
                                                                      
     
# ./spec/models/admin_users_spec.rb:2:in `block (2 levels) in <top (required)>'
                                                                                
                                                                                
                             
                                                                                
                                                                                
                                                                                
                                 
  2) Admin should respond to #password                                          
                                                                                
                                                                                
                                 
     Failure/Error: it { is_expected.to respond_to(:password) }
                                                                                
                                                                                
                                                  
       expected "Admin" to respond to :password
                                                                                
                                                                                
                                                                  
     
# ./spec/models/admin_users_spec.rb:3:in `block (2 levels) in <top (required)>'
                                                                                
                                                                                
                             
                                                                                
                                                                                
                                                                                
                                 
Finished in 0.00213 seconds (files took 0.16881 seconds to load)                
                                                                                
                                                                                
                                 
4 examples, 2 failures
                                                                                
                                                                                
                                                                                
           
                                                                                
                                                                                
                                                                                
                                 
Failed examples:                                                                
                                                                                
                                                                                
                                 
                                                                                
                                                                                
                                                                                
                                 
rspec ./spec/models/admin_users_spec.rb:2 # Admin should respond to #name
                                                                                
                                                                                
                                        
rspec ./spec/models/admin_users_spec.rb:3 
# Admin should respond to #password   


Op zondag 10 augustus 2014 13:25:25 UTC+2 schreef Roelof Wobben:

> Hello, 
>
> I did make a admin user with Devise with rails g devise Admin.
> I see that I have name and password,
>
> But when I test it with this : 
>
> describe "Admin" do  
>   it { is_expected.to respond_to(:name) }
>   it { is_expected.to respond_to(:password) }
>   it { is_expected.not_to respond_to(:to_model) }
>   it { is_expected.not_to respond_to(:compact, :flatten) }
> end
>
> I see this output : 
>
>
> Failures:                                                                     
>                                                                               
>                                                                               
>                                        
>
>                                                                               
>                                                                               
>                                                                               
>                                        
>
>   1) admins should respond to #name                                           
>                                                                               
>                                                                               
>                                        
>      Failure/Error: it { is_expected.to respond_to(:name) }
>                                                                               
>                                                                               
>                                                           
>        expected "admins" to respond to :name
>                                                                               
>                                                                               
>                                                                          
>      
> # ./spec/models/admin_users_spec.rb:2:in `block (2 levels) in <top 
> (required)>'
>                                                                               
>                                                                               
>                                  
>
>                                                                               
>                                                                               
>                                                                               
>                                        
>
>   2) admins should respond to #password                                       
>                                                                               
>                                                                               
>                                        
>      Failure/Error: it { is_expected.to respond_to(:password) }
>                                                                               
>                                                                               
>                                                       
>        expected "admins" to respond to :password
>                                                                               
>                                                                               
>                                                                      
>      
> # ./spec/models/admin_users_spec.rb:3:in `block (2 levels) in <top 
> (required)>'
>                                                                               
>                                                                               
>                                  
>
>                                                                               
>                                                                               
>                                                                               
>                                        
>
> Finished in 0.00226 seconds (files took 0.16221 seconds to load)              
>                                                                               
>                                                                               
>                                        
> 4 examples, 2 failures
>                                                                               
>                                                                               
>                                                                               
>                  
>
>                                                                               
>                                                                               
>                                                                               
>                                        
>
> Failed examples:                                                              
>                                                                               
>                                                                               
>                                        
>
>                                                                               
>                                                                               
>                                                                               
>                                        
> rspec ./spec/models/admin_users_spec.rb:2 # admins should respond to #name
>                                                                               
>                                                                               
>                                            
> rspec ./spec/models/admin_users_spec.rb:3 
> # admins should respond to #password    
>
> Roelof
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/a6c1df1a-7901-4e92-8719-3d2846496d81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to