Closed corroded closed 10 years ago
You've selected the Devise Confirmable module. The tests were written for Devise with default modules.
It'd be great if you could provide the code for tests with the Confirmable module so we can avoid this problem in the future.
As per the issue I created at the below link, I'm having the same test failures with the default modules.
With the confirmable module option chosen using RailsComposer, I'm not getting these errors. Are you guys sure you are using a completely fresh version of RailsComposer? Those specs aren't using documentation formatting, which I know the RailsComposer puts into the .rspec
file by default.
Anyway, besides the deprecation warnings, which I think are being solved over at the Pundit repo, all I'm getting is a single error regarding the edit user spec due to a simple matching inconsistency. The test reads
"Your account has been updated successfully,"
but should be
"You updated your account successfully,"
I have forked the RailsAppsComposer and made what I believe is the proper fix, but I'm a beginner and am not really sure how to make this into a gem and regression test it to make sure I made the right change. I have made the above change, of course, in my generated example app's spec file manually and confirmed that it passes the test.
Confirmed that updating Gemfile to switch
gem pundit
to:
gem 'pundit', :git => 'https://github.com/elabs/pundit.git'
fixes the deprecation warnings. Obviously this is pulling the latest commits off of the pundit repo, and therefore is not necessarily a very stable thing to do, but hopefully they will push a new release soon.
@noelrappin fixed the RSpec deprecation warnings for Pundit with https://github.com/elabs/pundit/pull/156. It'd be nice to see a release of the updated Pundit (hey guys!).
The 'user can delete own account' example also needs to be changed to:
expect(page).to have_content 'Bye! Your account has been successfully cancelled. We hope to see you again soon.'
@robwise I've made the fix to the tests per your suggestion. Thanks!
I tried running the tests and a lot of them failed. Is this expected or is there something wrong with my installation?
Steps to reproduce:
rails new rails-devise-pundit -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb
These are my answers to the interactive wizard (I liberally omitted the parts I think are not important - like the other choices etc)
After that, I
cd
into the directory and runrspec
: