Skip to content

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

Closed
@mindlace

Description

@mindlace

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions