Skip to content

Commit

Permalink
Add a document on :context
Browse files Browse the repository at this point in the history
  • Loading branch information
kana committed Apr 12, 2014
1 parent e208eb4 commit 542f657
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/vspec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,25 @@ COMMANDS *vspec-commands*
end
end
:context {subject} *:context*
:end
Define a set of examples about {subject}. This is an
alias of |:context|. It is useful to make nested
groups more readable. For example: >
describe 'textobj-function'
context 'with JavaScript'
it 'targets a function'
...
end
end
context 'with Ruby'
it 'targets a method'
...
end
end
end
:it {example} *:it*
:end
Define an example. {example} is a string to describe
Expand Down

0 comments on commit 542f657

Please sign in to comment.