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

raise WrongScopeError after upgrade rails 6.1 #56

Closed
x1wins opened this issue Aug 26, 2021 · 1 comment
Closed

raise WrongScopeError after upgrade rails 6.1 #56

x1wins opened this issue Aug 26, 2021 · 1 comment
Assignees
Labels
dependencies Pull requests that update a dependency file rails 6.1 rails version upgrade system-error

Comments

@x1wins
Copy link
Owner

x1wins commented Aug 26, 2021

% docker-compose run --no-deps web bundle exec rspec --format documentation

Creating cw-ovp_web_run ... done

EncodesController
  GET #index
    returns a success response (FAILED - 1)
  GET #show
    returns a success response (FAILED - 2)
  GET #new
    returns a success response (FAILED - 3)
  POST #create
    with valid params
      creates a new Encode (FAILED - 4)
      redirects to the created encode (FAILED - 5)
    with invalid params
      returns a success response (i.e. to display the 'new' template) (FAILED - 6)

EncodesController
  routing
    routes to #index (FAILED - 7)
    routes to #new (FAILED - 8)
    routes to #show (FAILED - 9)
    routes to #create (FAILED - 10)

encodes/index
  renders a list of encodes (FAILED - 11)

encodes/new
  renders new encode form (FAILED - 12)

encodes/show
  renders attributes in <p> (FAILED - 13)

Failures:

  1) EncodesController GET #index returns a success response
     Failure/Error:
       raise WrongScopeError,
             "`#{name}` is not available from within an example (e.g. an " \
             "`it` block) or from constructs that run in the scope of an " \
             "example (e.g. `before`, `let`, etc). It is only available " \
             "on an example group (e.g. a `describe` or `context` block)."
     
       `name` is not available from within an example (e.g. an `it` block) or from constructs that run in the scope of an example (e.g. `before`, `let`, etc). It is only available on an example group (e.g. a `describe` or `context` block).

image

@x1wins x1wins self-assigned this Aug 26, 2021
@x1wins x1wins added dependencies Pull requests that update a dependency file rails 6.1 rails version upgrade system-error labels Aug 26, 2021
@x1wins
Copy link
Owner Author

x1wins commented Aug 26, 2021

https://makandracards.com/makandra/495334-how-to-fix-wrongscopeerror-when-using-rspec_rails-with-rails-6-1

  1. rm -rf Gemfile.lock
  2. Upgrade rails-rspec
-  gem 'rspec-rails', '4.0.0.beta3'
+ gem 'rspec-rails', '~> 5.0', '>= 5.0.2'

@x1wins x1wins closed this as completed Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rails 6.1 rails version upgrade system-error
Projects
None yet
Development

No branches or pull requests

1 participant