Ruby on Rails Wednesday, March 18, 2015

Le message d'erreur c'est ça :
$ rspec spec/
................FF......

Failures:

 
1) User devrait rejeter les emails doubles
     
Failure/Error: user_duplicate.should_not be_valid
       expected
#<User id: 2, nom: nil, email: nil, created_at: "2015-03-18 07:08:44", updated_at: "2015-03-18 07:08:44"> not to be valid
     
# ./spec/models/user_spec.rb:58:in `block (2 levels) in <top (required)>'

 
2) User devrait rejeter les emails doubles insensible à la casse
     
Failure/Error: user.should_not be_valid
       expected
#<User id: 2, nom: nil, email: nil, created_at: "2015-03-18 07:08:44", updated_at: "2015-03-18 07:08:44"> not to be valid
     
# ./spec/models/user_spec.rb:65:in `block (2 levels) in <top (required)>'

Deprecation Warnings:

Using `should_not` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /media/jeremy/5256-8C40/sample_app/spec/models/user_spec.rb:25:in `block (2 levels) in <top (required)>'.


If you need more of the backtrace for any of these deprecations to
identify
where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings
into errors, giving you the full backtrace.

1 deprecation warning total

Finished in 0.16859 seconds (files took 1.08 seconds to load)
24 examples, 2 failures

Failed examples:

rspec
./spec/models/user_spec.rb:55 # User devrait rejeter les emails doubles
rspec
./spec/models/user_spec.rb:61 # User devrait rejeter les emails doubles insensible à la casse


D'ailleurs j'ai un warning dont je ne connais pas la cause mais ça je verrais plus tard au pire. J'ai enlevé le ! du deuxième create, ça change rien, j'ai enlevé des deux create rien non plus et j'ai inversé les deux ça fait toujours rien donc je sais pas d'où ça viens...

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0238a955-5798-4a7f-975e-491b474c212a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment