sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Mocha::Expectation#in_sequence

Constrains the expectation so that it must be invoked at the current point in the +sequence+.

To expect a sequence of invocations, write the expectations in order and add the +in_sequence(sequence)+ clause to each one.

Expectations in a +sequence+ can have any invocation count.

If an expectation in a sequence is stubbed, rather than expected, it can be skipped in the +sequence+.

An expected method can appear in multiple sequences.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/mocha-1.1.0/lib/mocha/expectation.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Mocha--Expectation-in_sequence-for-pr


# Commit to git

git add app/server/ruby/vendor/mocha-1.1.0/lib/mocha/expectation.rbgit commit -m "better docs for Mocha::Expectation#in_sequence"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Mocha--Expectation-in_sequence-for-pr

hub pull-request


# Celebrate!