Skip to content

Instantly share code, notes, and snippets.

@garigari-kun
Created July 2, 2018 05:10
Show Gist options
  • Save garigari-kun/7a046bc7d38bb51576c37450dc81372c to your computer and use it in GitHub Desktop.
Save garigari-kun/7a046bc7d38bb51576c37450dc81372c to your computer and use it in GitHub Desktop.
describe 'workspace' do
before do
puts 'before: outer before called.'
end
after do
puts 'after: outer after called'
end
let!(:outer_let) { puts "outer let variable defined" }
context 'context: a' do
before do
puts 'before: a called'
end
it 'it: a' do
puts 'it: a called.'
end
end
context 'context: b' do
it 'it: b' do
puts 'it: b called.'
end
end
end
"""
before: outer before called.
outer let variable defined
before: a called
it: a called.
after: outer after called
.before: outer before called.
outer let variable defined
it: b called.
after: outer after called
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment