snippets for before(:all) and after(:all) by stevenchanin · Pull Request #65 · SublimeText/RSpec · GitHub
Skip to content

snippets for before(:all) and after(:all)#65

Merged
princemaple merged 1 commit into
SublimeText:masterfrom
stevenchanin:master
Jan 30, 2016
Merged

snippets for before(:all) and after(:all)#65
princemaple merged 1 commit into
SublimeText:masterfrom
stevenchanin:master

Conversation

@stevenchanin

Copy link
Copy Markdown
Contributor

Using before(:all) and after(:all) is very helpful for speeding up test cases where lots of objects are needed for stateful testing. The existing snippets are inconsistent since bef gives you

before do
end

and aft gives you

after(:each) do
end

Since before == before(:each) which is probably the most common use case, I didn't want to modify that. So I just added befa and afta to explicitly expand to before(:all) and after(:all)

This are convenient if you are trying to speed up your specs
princemaple added a commit that referenced this pull request Jan 30, 2016
snippets for before(:all) and after(:all)
@princemaple princemaple merged commit 79a33c2 into SublimeText:master Jan 30, 2016
@princemaple

Copy link
Copy Markdown
Member

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.

2 participants