mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-22 02:00:12 +01:00
Removed superfluous 'tracks' directory at the root of the repository.
Testing commits to github.
This commit is contained in:
parent
6a42901514
commit
4cbf5a34d3
2269 changed files with 0 additions and 0 deletions
23
vendor/plugins/unobtrusive_javascript/test/lib/ptk/suite/difference.rb
vendored
Normal file
23
vendor/plugins/unobtrusive_javascript/test/lib/ptk/suite/difference.rb
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class Test::Unit::TestCase
|
||||
|
||||
# http://project.ioni.st/post/217#post-217
|
||||
#
|
||||
# def test_new_publication
|
||||
# assert_difference(Publication, :count) do
|
||||
# post :create, :publication => {...}
|
||||
# # ...
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# modified by mabs29 to include arguments
|
||||
def assert_difference(object, method = nil, difference = 1, *args)
|
||||
initial_value = object.send(method, *args)
|
||||
yield
|
||||
assert_equal initial_value + difference, object.send(method, *args), "#{object}##{method}"
|
||||
end
|
||||
|
||||
def assert_no_difference(object, method, *args, &block)
|
||||
assert_difference object, method, 0, *args, &block
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue