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

Unable to run single(!) rails interactor at rails 6 #33

Open
AnnaAgf opened this issue Jul 12, 2020 · 1 comment
Open

Unable to run single(!) rails interactor at rails 6 #33

AnnaAgf opened this issue Jul 12, 2020 · 1 comment

Comments

@AnnaAgf
Copy link

AnnaAgf commented Jul 12, 2020

Dear support,

wasn't able to get answer at https://stackoverflow.com/questions/62833926/unable-to-run-single-rails-interactor-at-rails-6

Unable to run single(!) rails interactor at rails 6. According to https://github.com/collectiveidea/interactor-rails execute: rails generate interactor authenticate_user to create interactor. Command bin/rspec works perfectly and produce output:

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) AuthenticateUser.call add some examples to (or delete) /Users/.../spec/interactors/authenticate_user_spec.rb
     # Not yet implemented
     # ./spec/interactors/authenticate_user_spec.rb:5

Command bin/rspec spec/interactors/authenticate_user_spec.rb to run single interactor produces error:

An error occurred while loading ./spec/interactors/authenticate_user_spec.rb.
Failure/Error:
  RSpec.describe AuthenticateUser, type: :interactor do
    describe '.call' do
      pending "add some examples to (or delete) #{__FILE__}"
    end
  end

NameError:
  uninitialized constant AuthenticateUser
# ./spec/interactors/authenticate_user_spec.rb:3:in `<top (required)>'
No examples found.


Finished in 0.00004 seconds (files took 0.25648 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

Sprint has been stopped: command "spring status"output: "Spring is not running"

Does anybody know how to run spec for single interactor? Could somebody help me to find problem? Thanks!

Sincerely yours,
Anna.

@AnnaAgf
Copy link
Author

AnnaAgf commented Jul 13, 2020

fix: default generator produce "require 'spec_helper'", it should be repalced with "require 'rails_helper'"

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

1 participant