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

Fix documentation for nested described_class #2629

Merged

Conversation

@pirj
Copy link
Member

@pirj pirj commented May 25, 2019

Fixes #2627

Documentation for described_class was out of date, a change was made in early 3.0 in #1361, but was not reflected to the docs.

Also, documentation for implicit subject was off, even though there is a feature describing how it behaves.

Fixes rspec#2627

Documentation for `described_class` was out of date, a change was made
in early 3.0 in rspec#1361, but was not reflected to the docs.

Also, documentation for implicit `subject` was off, even though there is
a feature describing how it behaves.
@pirj
Copy link
Member Author

@pirj pirj commented May 25, 2019

Any suggestion how to deal with Ruby 2.2 Rails 5.0 build failure in rspec-rails?

Gem::RuntimeRequirementNotMetError: i18n requires Ruby version >= 2.3.0. The current ruby version is 2.2.0.
An error occurred while installing i18n (1.6.0), and Bundler cannot continue.
...
In Gemfile:
  rails was resolved to 5.0.7.2, which depends on
    actioncable was resolved to 5.0.7.2, which depends on
      actionpack was resolved to 5.0.7.2, which depends on
        actionview was resolved to 5.0.7.2, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            activesupport was resolved to 5.0.7.2, which depends on
              i18n

It seems that Ruby dependency was bumped quite a while ago already.

Loading

Copy link
Member

@myronmarston myronmarston left a comment

LGTM! Gonna merge since the build failure is clearly unrelated.

Loading

@myronmarston myronmarston merged commit d04d4de into rspec:master May 27, 2019
1 of 2 checks passed
Loading
@pirj pirj deleted the fix-described_class-in-nested-examples-doc branch May 27, 2019
@pirj
Copy link
Member Author

@pirj pirj commented May 27, 2019

Awesome, thanks!

Loading

pirj added a commit to pirj/rubocop-rspec that referenced this issue Jul 5, 2019
RSpec is actually setting the innermost described class as
`described_class`, not the top-level one:
rspec/rspec-core#2627
rspec/rspec-core#2629
https://github.com/rspec/rspec-core/blob/master/Changelog.md#300rc1--2014-05-18

> Breaking Changes for 3.0.0:
>   Change described_class so that in a nested group like describe
>   MyClass, it returns MyClass rather than the outer group's described
>   class.
pirj added a commit to pirj/rubocop-rspec that referenced this issue Jul 10, 2019
RSpec is actually setting the innermost described class as
`described_class`, not the top-level one:
rspec/rspec-core#2627
rspec/rspec-core#2629
https://github.com/rspec/rspec-core/blob/master/Changelog.md#300rc1--2014-05-18

> Breaking Changes for 3.0.0:
>   Change described_class so that in a nested group like describe
>   MyClass, it returns MyClass rather than the outer group's described
>   class.
pirj added a commit to pirj/rubocop-rspec that referenced this issue Jul 10, 2019
RSpec is actually setting the innermost described class as
`described_class`, not the top-level one:
rspec/rspec-core#2627
rspec/rspec-core#2629
https://github.com/rspec/rspec-core/blob/master/Changelog.md#300rc1--2014-05-18

> Breaking Changes for 3.0.0:
>   Change described_class so that in a nested group like describe
>   MyClass, it returns MyClass rather than the outer group's described
>   class.
@pirj
Copy link
Member Author

@pirj pirj commented Aug 4, 2019

Is it possible to update 3-8-maintenance branch with this change? It's still outdated on Relish (1, 2) for both https://relishapp.com/rspec/rspec-core/docs/ and https://relishapp.com/rspec/rspec-core/v/3-8/docs paths.

Loading

@myronmarston
Copy link
Member

@myronmarston myronmarston commented Aug 8, 2019

Loading

@JonRowe
Copy link
Member

@JonRowe JonRowe commented Aug 8, 2019

Thanks @myronmarston :)

Loading

kellysutton added a commit to kellysutton/rubocop-rspec that referenced this issue Oct 28, 2019
RSpec is actually setting the innermost described class as
`described_class`, not the top-level one:
rspec/rspec-core#2627
rspec/rspec-core#2629
https://github.com/rspec/rspec-core/blob/master/Changelog.md#300rc1--2014-05-18

> Breaking Changes for 3.0.0:
>   Change described_class so that in a nested group like describe
>   MyClass, it returns MyClass rather than the outer group's described
>   class.
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this issue Oct 30, 2020
…-examples-doc

Fix documentation for nested described_class
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this issue Oct 6, 2021
…ed_class-in-nested-examples-doc

Fix documentation for nested described_class

---
This commit was imported from rspec/rspec-core@d04d4de.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants