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

Retry skips include_context calls #70

Open
ghost opened this issue Mar 10, 2017 · 1 comment
Open

Retry skips include_context calls #70

ghost opened this issue Mar 10, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 10, 2017

I have an include_context call before my it statement that I want to retry, this include_context contains a before_all. When the test fails, the it-statement is reran, but the before_all inside the include_context is not. Also if there is a failure in the include_context, then the test is not reran at all. Here is an example

describe "Cool Operation", :retry => 10, :verbose_retry => true,  do

  include_context('cool setup - before all')

  it 'does cool stuff' do
    expect(@var_setup_in_before_all).to eq(CoolObject)
  end
end

I have tried setting the :retry option on the 'it' statement and the 'describe' statement, but neither will retry the include_context. Does this gem support this feature?

@michaelglass
Copy link
Contributor

I think:
rspec_retry reruns the test as part of the suite so doesn't rerun before(:all) (it should rerun before(:each))
The logic to retry a whole context or describe block is something I haven't touched.

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