Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongoid syntax errors in features/step_definitions/user_steps.rb #45

Closed
mindlace opened this issue Nov 18, 2012 · 2 comments
Closed

mongoid syntax errors in features/step_definitions/user_steps.rb #45

mindlace opened this issue Nov 18, 2012 · 2 comments

Comments

@mindlace
Copy link

The devise cucumber/Rspec tests use a (old?) invalid way of accessing objects with mongoid.

in find_user and delete_user, changing the @user= line to read:

User.where(email: @visitor[:email]).first

fixes the problem. (I also made delete_user do @user ||= find_user instead of repeating the same line)

Below is what I chose:

Recipes:
[“controllers”, “core”, “email”, “extras”, “frontend”, “gems”, “git”, “init”, “models”, “prelaunch”, “railsapps”, “readme”, “routes”, “saas”, “setup”, “testing”, “views”]
Preferences:
{:git=>true, :railsapps=>“none”, :dev_webserver=>“webrick”, :prod_webserver=>“puma”, :database=>“mongodb”, :orm=>“mongoid”, :templates=>“erb”, :unit_test=>“rspec”, :integration=>“cucumber”, :fixtures=>“factory_girl”, :frontend=>“bootstrap”, :bootstrap=>“sass”, :email=>“mandrill”, :authentication=>“devise”, :devise_modules=>“default”, :authorization=>“cancan”, :form_builder=>“simple_form”, :starter_app=>“admin_app”, :quiet_assets=>true, :ban_spiders=>true, :rvmrc=>true}

@MarkDBlackwell
Copy link

As you may know, generally speaking in the generation process, the test code of each example app is read by (or "flows into") gem rails_apps_composer.

Just as you suggest, the test code in each example app could be made compatible with MongoDB, as well as with ActiveRecord. Examples are pull request 8 for app rails3-subdomains and pull request 25 for app rails3-mongoid-devise.

Some people would like to select preference MongoDB generally. And this proposal would advance us a step further toward enabling our tests to work (across all the apps) for them.

zealot128 pushed a commit to zealot128-os/rails-composer that referenced this issue Apr 12, 2014
@DanielKehoe
Copy link
Member

I'm closing out old issues.

MongoDB and Mongoid are no longer supported by Rails Composer, as reported in this blog post: MongoDB Dropped From Rails Composer.

However, if you're interested in restoring Mongoid as an option in Rails Composer, you can join the MongoDB Rescue Operation. See the blog post for details.

Thank you for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants