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
Contributor

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.

Fix documentation for nested described_class
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.
@pirj

This comment has been minimized.

Copy link
Contributor Author

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.

@myronmarston
Copy link
Member

left a comment

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

@myronmarston myronmarston merged commit d04d4de into rspec:master May 27, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@pirj pirj deleted the pirj:fix-described_class-in-nested-examples-doc branch May 27, 2019

@pirj

This comment has been minimized.

Copy link
Contributor Author

commented May 27, 2019

Awesome, thanks!

pirj added a commit to pirj/rubocop-rspec that referenced this pull request Jul 5, 2019

Take innermost class for described_class
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 pull request Jul 10, 2019

Take innermost class for described_class
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 pull request Jul 10, 2019

Take innermost class for described_class
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 pirj referenced this pull request Jul 10, 2019
5 of 5 tasks complete
@pirj pirj referenced this pull request Aug 4, 2019
@pirj

This comment has been minimized.

Copy link
Contributor Author

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.

@myronmarston

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

@JonRowe

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

Thanks @myronmarston :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.