Sorry , I copied the wrong test result. Here are the right one : 

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
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

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/e72d08bf-2272-4b63-813b-574d26aa17d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to