Skip to content

Instantly share code, notes, and snippets.

@axsuul
Created December 11, 2019 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axsuul/c63e0727648f4bec0f95676e1e3523cc to your computer and use it in GitHub Desktop.
Save axsuul/c63e0727648f4bec0f95676e1e3523cc to your computer and use it in GitHub Desktop.
# in helper
def with_custom_context
context("when in custom context") do
before do
@custom_context = true
end
yield
end
end
# in spec
with_custom_context do
it "passes test" do
expect(@custom_context).to eq true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment