https://github.com/ruby/power_assert
Power Assert for Ruby
https://github.com/ruby/power_assert
Keywords from Contributors
rubygems activerecord activejob mvc repl rspec feature-flag ruby-gem rack documentation-tool
Last synced: about 13 hours ago
JSON representation
Repository metadata
Power Assert for Ruby
- Host: GitHub
- URL: https://github.com/ruby/power_assert
- Owner: ruby
- License: other
- Created: 2014-05-20T14:03:16.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2026-05-17T06:07:48.000Z (7 days ago)
- Last Synced: 2026-05-17T22:41:14.266Z (7 days ago)
- Language: Ruby
- Size: 308 KB
- Stars: 202
- Watchers: 35
- Forks: 27
- Open Issues: 6
- Releases: 38
-
Metadata Files:
- Readme: README.md
- License: COPYING
README.md
power_assert
About
Power Assert shows each value of variables and method calls in the expression.
It is useful for testing, providing which value wasn't correct when the condition is not satisfied.
Failure:
assert { 3.times.to_a.include?(3) }
| | |
| | false
| [0, 1, 2]
#<Enumerator: 3:times>
Related Projects
In general, you don't need to use this library directly.
Use following test frameworks or extensions instead.
- test-unit(>= 3.0.0)
- minitest-power_assert
- rspec-power_assert
- rspec-matchers-power_assert_matchers
- pry-power_assert
- irb-power_assert
- power_p
Requirement
- CRuby 3.1+
Configuration
To colorize output messages, add require "power_assert/colorize" to your code.
(It requires irb 1.3.1+)
Known Limitations
- Expressions must be on a single line. Splitting an assertion across multiple lines prevents any report from being generated, e.g.:
assert do
# Reported
func(foo: 0123456789, bar: "abcdefg")
end
assert do
# Not reported
func(foo: 0123456789,
bar: "abcdefg")
end
- Expressions must include at least one method call. Assertions without method calls generate no report, e.g.:
val = false
assert do
# Reported
val == true
end
assert do
# Not reported
val
end
- Return values from
method_missingorsupergenerate no report, e.g.:
class Foo
def method_missing(*)
:foo
end
end
foo = Foo.new
assert do
# Not reported
foo.foo
end
- Avoid conditional branches inside assertions. Conditional logic may prevent a report from being generated, e.g.:
condition = true
expected = false
actual = true
assert do
# This fails, but nothing is reported
condition ? expected == actual : expected == actual
end
- (CRuby 4.0+)
<Struct subclass>.newgenerates no report. Use<Struct subclass>.[]instead, e.g.:
s = Struct.new(:a)
assert do
# Not reported
s.new(0)
end
assert do
# Reported
s[0]
end
Reference
Owner metadata
- Name: The Ruby Programming Language
- Login: ruby
- Email: info@ruby-lang.org
- Kind: organization
- Description: Repositories related to the Ruby Programming language
- Website: https://www.ruby-lang.org/
- Location: Matsue, Japan
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/210414?v=4
- Repositories: 171
- Last ynced at: 2023-04-09T03:40:20.875Z
- Profile URL: https://github.com/ruby
GitHub Events
Total
- Release event: 3
- Delete event: 3
- Pull request event: 18
- Fork event: 2
- Issues event: 1
- Watch event: 8
- Issue comment event: 11
- Push event: 17
- Pull request review event: 2
- Pull request review comment event: 1
- Create event: 3
Last Year
- Release event: 1
- Delete event: 3
- Pull request event: 10
- Fork event: 1
- Watch event: 3
- Issue comment event: 7
- Push event: 10
- Create event: 2
Committers metadata
Last synced: 1 day ago
Total Commits: 391
Total Committers: 17
Avg Commits per committer: 23.0
Development Distribution Score (DDS): 0.095
Commits in past year: 12
Committers in past year: 4
Avg Commits per committer in past year: 3.0
Development Distribution Score (DDS) in past year: 0.5
| Name | Commits | |
|---|---|---|
| Kazuki Tsujimoto | k****i@c****t | 354 |
| Hiroshi SHIBATA | h****t@r****g | 9 |
| dependabot[bot] | 4****] | 4 |
| joker1007 | k****t@g****m | 4 |
| Nobuyoshi Nakada | n****u@r****g | 3 |
| yui-knk | s****a@g****m | 3 |
| Kevin Newton | k****n@g****m | 2 |
| Peter Goldstein | p****n@g****m | 2 |
| sonots | s****s@g****m | 2 |
| Jean Boussier | j****r@g****m | 1 |
| Jeremy Evans | c****e@j****t | 1 |
| Jun Aruga | j****a@r****m | 1 |
| Kenichi Kamiya | k****1@g****m | 1 |
| Shun MIZUKAMI | n****4@g****m | 1 |
| Sutou Kouhei | k****u@c****m | 1 |
| YUKI "Piro" Hiroshi | p****x@g****m | 1 |
| Yoshiyuki Kinjo | y****n@g****m | 1 |
Committer domains:
- ruby-lang.org: 2
- clear-code.com: 1
- redhat.com: 1
- jeremyevans.net: 1
- callcc.net: 1
Issue and Pull Request metadata
Last synced: 7 days ago
Total issues: 25
Total pull requests: 48
Average time to close issues: 28 days
Average time to close pull requests: 5 days
Total issue authors: 19
Total pull request authors: 22
Average comments per issue: 2.16
Average comments per pull request: 1.1
Merged pull request: 35
Bot issues: 0
Bot pull requests: 3
Past year issues: 0
Past year pull requests: 10
Past year average time to close issues: N/A
Past year average time to close pull requests: 25 days
Past year issue authors: 0
Past year pull request authors: 6
Past year average comments per issue: 0
Past year average comments per pull request: 1.3
Past year merged pull request: 3
Past year bot issues: 0
Past year bot pull requests: 2
Top Issue Authors
- akicho8 (5)
- utkarsh2102 (2)
- hsbt (2)
- unak (1)
- mtasaka (1)
- kbaba1001 (1)
- graaff (1)
- piroor (1)
- sanemat (1)
- junaruga (1)
- joker1007 (1)
- voxik (1)
- altV (1)
- wwood (1)
- MSP-Greg (1)
Top Pull Request Authors
- k-tsj (7)
- nobu (5)
- hsbt (4)
- yui-knk (3)
- Earlopain (3)
- dependabot[bot] (3)
- petergoldstein (2)
- tenderlove (2)
- joker1007 (2)
- piroor (2)
- jeremyevans (2)
- casperisfine (2)
- MSP-Greg (2)
- sonots (1)
- akicho8 (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (3)
- github_actions (2)
Package metadata
- Total packages: 29
-
Total downloads:
- rubygems: 158,575,563 total
- Total docker downloads: 9,584,859,750
- Total dependent packages: 29 (may contain duplicates)
- Total dependent repositories: 17,456 (may contain duplicates)
- Total versions: 148
- Total maintainers: 3
gem.coop: power_assert
Power Assert shows each value of variables and method calls in the expression. It is useful for testing, providing which value wasn't correct when the condition is not satisfied.
- Homepage: https://github.com/ruby/power_assert
- Documentation: http://www.rubydoc.info/gems/power_assert/
- Licenses: BSD-2-Clause,Ruby
- Latest release: 3.0.1 (published 7 months ago)
- Last Synced: 2026-05-23T07:01:43.948Z (1 day ago)
- Versions: 38
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 79,282,881 Total
- Docker Downloads: 4,792,429,875
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Docker downloads count: 0.002%
- Average: 0.099%
- Downloads: 0.394%
- Maintainers (2)
rubygems.org: power_assert
Power Assert shows each value of variables and method calls in the expression. It is useful for testing, providing which value wasn't correct when the condition is not satisfied.
- Homepage: https://github.com/ruby/power_assert
- Documentation: http://www.rubydoc.info/gems/power_assert/
- Licenses: BSD-2-Clause,Ruby
- Latest release: 3.0.1 (published 7 months ago)
- Last Synced: 2026-05-23T16:31:07.140Z (1 day ago)
- Versions: 38
- Dependent Packages: 21
- Dependent Repositories: 17,456
- Downloads: 79,292,682 Total
- Docker Downloads: 4,792,429,875
-
Rankings:
- Docker downloads count: 0.004%
- Dependent repos count: 0.27%
- Downloads: 0.406%
- Dependent packages count: 1.022%
- Average: 1.87%
- Stargazers count: 4.125%
- Forks count: 5.39%
- Maintainers (2)
proxy.golang.org: github.com/ruby/power_assert
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ruby/power_assert#section-documentation
- Licenses: other
- Latest release: v3.0.1+incompatible (published 7 months ago)
- Last Synced: 2026-05-22T04:02:22.371Z (3 days ago)
- Versions: 38
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 3.652%
- Forks count: 4.693%
- Average: 7.181%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
alpine-v3.15: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 1.2.0-r0 (published over 4 years ago)
- Last Synced: 2026-04-01T13:25:15.409Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 4
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 6.546%
- Average: 8.115%
- Stargazers count: 11.301%
- Forks count: 14.612%
- Maintainers (1)
alpine-v3.18: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.3-r0 (published about 3 years ago)
- Last Synced: 2026-04-09T02:09:00.914Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 9.426%
- Stargazers count: 16.453%
- Forks count: 21.251%
- Maintainers (1)
alpine-v3.18: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.3-r0 (published about 3 years ago)
- Last Synced: 2026-04-09T02:09:30.331Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 9.426%
- Stargazers count: 16.453%
- Forks count: 21.251%
- Maintainers (1)
alpine-v3.16: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.1-r0 (published about 4 years ago)
- Last Synced: 2026-04-02T15:37:42.061Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 2
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Average: 10.059%
- Dependent packages count: 12.044%
- Stargazers count: 12.338%
- Forks count: 15.854%
- Maintainers (1)
alpine-v3.17: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.2-r0 (published over 3 years ago)
- Last Synced: 2026-04-08T14:08:38.939Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 2
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Average: 11.643%
- Dependent packages count: 12.748%
- Stargazers count: 14.926%
- Forks count: 18.895%
- Maintainers (1)
alpine-v3.15: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 1.2.0-r0 (published over 4 years ago)
- Last Synced: 2026-04-01T13:25:35.778Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Stargazers count: 11.301%
- Average: 12.874%
- Forks count: 14.612%
- Dependent packages count: 25.585%
- Maintainers (1)
alpine-edge: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.5-r0 (published about 1 year ago)
- Last Synced: 2026-03-12T01:10:58.131Z (2 months ago)
- Versions: 5
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Average: 13.544%
- Dependent packages count: 14.641%
- Stargazers count: 17.697%
- Forks count: 21.838%
- Maintainers (1)
alpine-edge: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.5-r0 (published about 1 year ago)
- Last Synced: 2026-03-12T01:12:18.059Z (2 months ago)
- Versions: 5
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Average: 13.544%
- Dependent packages count: 14.641%
- Stargazers count: 17.697%
- Forks count: 21.838%
- Maintainers (1)
alpine-v3.16: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.1-r0 (published about 4 years ago)
- Last Synced: 2026-04-02T15:37:47.435Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Stargazers count: 12.338%
- Average: 13.876%
- Forks count: 15.854%
- Dependent packages count: 27.311%
- Maintainers (1)
alpine-v3.17: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.2-r0 (published over 3 years ago)
- Last Synced: 2026-04-03T06:26:35.587Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Stargazers count: 14.926%
- Average: 15.269%
- Forks count: 18.895%
- Dependent packages count: 27.254%
- Maintainers (1)
ubuntu-23.10: ruby-power-assert
- Homepage: https://github.com/ruby/power_assert
- Licenses:
- Latest release: 2.0.3-1 (published 3 months ago)
- Last Synced: 2026-03-14T03:15:20.211Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.04: ruby-power-assert
- Homepage: https://github.com/ruby/power_assert
- Licenses:
- Latest release: 2.0.3-1 (published 3 months ago)
- Last Synced: 2026-03-11T15:28:30.230Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-power-assert
- Homepage: https://github.com/ruby/power_assert
- Documentation: https://packages.debian.org/bookworm/ruby-power-assert
- Licenses:
- Latest release: 2.0.3-1 (published 3 months ago)
- Last Synced: 2026-03-13T04:21:20.065Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
alpine-v3.19: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.3-r0 (published about 3 years ago)
- Last Synced: 2026-04-02T15:48:56.331Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.21: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.4-r0 (published over 1 year ago)
- Last Synced: 2026-04-03T06:21:55.307Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.20: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.3-r1 (published over 2 years ago)
- Last Synced: 2026-04-08T14:02:19.026Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
debian-13: ruby-power-assert
- Homepage: https://github.com/ruby/power_assert
- Documentation: https://packages.debian.org/trixie/ruby-power-assert
- Licenses:
- Latest release: 2.0.3-1 (published 3 months ago)
- Last Synced: 2026-03-14T18:10:59.794Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
alpine-v3.21: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.4-r0 (published over 1 year ago)
- Last Synced: 2026-04-03T06:21:57.496Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.19: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.3-r0 (published about 3 years ago)
- Last Synced: 2026-04-08T14:06:01.684Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.22: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.5-r0 (published about 1 year ago)
- Last Synced: 2026-04-03T06:22:11.115Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.23: ruby-power_assert
Debug tool for Ruby that displays intermediate results of a method chain
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.5-r0 (published about 1 year ago)
- Last Synced: 2026-04-09T23:07:19.858Z (about 1 month ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.23: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.5-r0 (published about 1 year ago)
- Last Synced: 2026-04-09T23:07:20.005Z (about 1 month ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
ubuntu-24.10: ruby-power-assert
- Homepage: https://github.com/ruby/power_assert
- Licenses:
- Latest release: 2.0.3-1 (published 3 months ago)
- Last Synced: 2026-03-09T18:22:21.704Z (3 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
alpine-v3.20: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.3-r1 (published over 2 years ago)
- Last Synced: 2026-04-08T14:02:16.568Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
alpine-v3.22: ruby-power_assert-doc
Debug tool for Ruby that displays intermediate results of a method chain (ri docs)
- Homepage: https://github.com/ruby/power_assert
- Licenses: BSD-2-Clause AND Ruby
- Latest release: 2.0.5-r0 (published about 1 year ago)
- Last Synced: 2026-04-03T06:22:09.877Z (about 2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
Dependencies
- benchmark-ips >= 0 development
- bundler >= 0 development
- byebug >= 0 development
- irb >= 1.3.1 development
- rake >= 0 development
- simplecov >= 0 development
- test-unit >= 0 development
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
- benchmark-ips >= 0 development
- bundler >= 0 development
- byebug >= 0 development
- irb >= 1.3.1 development
- rake >= 0 development
- simplecov >= 0 development
- test-unit >= 0 development
Score: 31.170613945834933