Created
October 9, 2011 07:42
-
-
Save justinko/1273411 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In request/integration/acceptance specs, the more examples you have, the slower the spec. | |
# This obviously applies to any other kind of spec, but the performance trade off | |
# is not worth it for high level tests - it can potentially cost you seconds. | |
# Hard to read/process but fast | |
describe 'viewing a user profile' do | |
before { login } | |
it 'displays the name, birthdate, active, address, phone number, last login' | |
end | |
# Descriptive but much, much slower | |
describe 'viewing a user profile' do | |
before { login } | |
it 'displays the name' | |
it 'displays the birthdate' | |
it 'displays the active status' | |
it 'displays the address' | |
it 'displays the phone number' | |
it 'displays the last login' | |
end | |
# (this is the proposal) | |
# Balanced - descriptive and fast (this would also reflect doc formatting) | |
# Downside: each description is not directly tied to an expectation | |
describe 'viewing a user profile' do | |
before { login } | |
it 'displays the name', | |
'displays the birthdate', | |
'displays the active status', | |
'displays the address', | |
'displays the phone number', | |
'displays the last login' | |
end | |
end | |
# Highest level (too high level IMO) | |
describe 'viewing a user profile' do | |
before { login } | |
it "displays the user's info" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@dchelimsky - Yeah, the comma separated strings don't really solve anything or offer much to be honest. They need to be tied to an individual expectation or it's just not worth it.