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

Super-dirty PoC: skip including shared example from unrelated contexts #2825

Closed

Conversation

pirj
Copy link
Member

@pirj pirj commented Dec 26, 2020

    RSpec.describe 'root' do
      context 'extra context' do
        shared_examples 'extra', :extra do
          it('extra!'){ }
        end
        context 'inner extra', :extra do
        end
      end

      context 'normal' do
        context 'inner', :extra do
          it('passes'){ }
        end
      end
    end

Before:

root
  extra context
    inner extra
      extra!
  normal
    inner
      extra! <==== we're trying to get rid of this
      passes

After:

root
  extra context
    inner extra
      extra!
  normal
    inner
      passes

    RSpec.describe 'root' do
      context 'extra context' do
        shared_examples 'extra', :extra do
          it('extra!'){ }
        end
        context 'inner extra', :extra do
        end
      end

      context 'normal' do
        context 'inner', :extra do
          it('passes'){ }
        end
      end
    end

Before:

    root
      extra context
        inner extra
          extra!
      normal
        inner
          extra! <==== we're trying to get rid of this
          passes

After:

    root
      extra context
        inner extra
          extra!
      normal
        inner
          passes
@pirj pirj self-assigned this Dec 26, 2020
@pirj pirj closed this Dec 29, 2020
@pirj pirj deleted the skip-including-shared-example-from-unrelated-contexts branch December 29, 2020 23:41
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

Successfully merging this pull request may close these issues.

None yet

1 participant