Last active
December 24, 2015 22:09
-
-
Save cupakromer/6870815 to your computer and use it in GitHub Desktop.
different ways of skinning tests
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
describe 'Something Awesome' do | |
context 'checking on the user' do | |
context 'given a guest user' do | |
subject(:guest) { create(:guest_user) } | |
it 'sees nothing' | |
end | |
context 'given an admin user' do | |
subject(:admin) { create(:admin) } | |
it 'sees all the things' | |
end | |
end | |
context 'adding an item' do | |
context 'given a guest user' do | |
subject(:guest) { create(:guest_user) } | |
it 'stores it in the cart' | |
it 'updates the total' | |
end | |
context 'given a normal user' do | |
subject(:shopper) { create(:user) } | |
it 'stores it in the cart' | |
it 'updates the total' | |
end | |
end | |
context 'foo awesome sauce' do | |
context 'given a normal user' do | |
subject(:shopper) { create(:user) } | |
it 'dances a jig' | |
it 'is happy' | |
end | |
end | |
end |
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
describe 'Something Awesome' do | |
context 'given a guest user' do | |
subject(:guest) { create(:guest_user) } | |
context 'checking on the user' do | |
it 'sees nothing' | |
end | |
context 'adding an item' do | |
it 'stores it in the cart' | |
it 'updates the total' | |
end | |
end | |
context 'given an admin user' do | |
subject(:admin) { create(:admin) } | |
context 'checking on the user' do | |
it 'sees all the things' | |
end | |
end | |
context 'given a normal user' do | |
subject(:shopper) { create(:user) } | |
context 'adding an item' do | |
it 'stores it in the cart' | |
it 'updates the total' | |
end | |
context 'foo awesome sauce' do | |
it 'dances a jig' | |
it 'is happy' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment