sonic-pi

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

C++

Code. Music. Live.

ActiveSupport::Testing::Assertions#assert_no_difference

Assertion that the numeric result of evaluating an expression is not
changed before and after invoking the passed in block.

  assert_no_difference 'Article.count' do
    post :create, article: invalid_attributes
  end

An error message can be specified.

  assert_no_difference 'Article.count', 'An Article should not be created' do
    post :create, article: invalid_attributes
  end

Source | Google | Stack overflow

Edit

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

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/testing/assertions.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--Testing--Assertions-assert_no_difference-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/testing/assertions.rbgit commit -m "better docs for ActiveSupport::Testing::Assertions#assert_no_difference"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--Testing--Assertions-assert_no_difference-for-pr

hub pull-request


# Celebrate!