minitest
tigerbeetle
Our great sponsors
minitest | tigerbeetle | |
---|---|---|
10 | 37 | |
3,243 | 1,012 | |
0.6% | - | |
8.2 | 9.5 | |
11 days ago | over 1 year ago | |
Ruby | Zig | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
minitest
-
Test Driving a Rails API - Part Two
In this part, we’ll set up our testing environment so that we can test our Rails API using minitest with minitest/spec. We’ll look at the differences between traditional style unit tests and spec-style tests, or specs. I’ll demonstrate why you should use minitest-rails. We’ll look at using rack-test for testing our API. We’ll even create our own generator to generate API specs.
-
Where can I learn to deliver a proper solution?
I forgot to mention that reading code is also a good way to learn how to write code, it's like inspiration. Check repos of some gems you like. For example sidekiq https://github.com/sidekiq/sidekiq/tree/main/lib/sidekiq Or minitest https://github.com/minitest/minitest/tree/master/lib/minitest
-
I_suck_and_my_tests_are_order_dependent
All through GitHub.
1. From https://github.com/rails/rails/blob/6ffb29d24e05abbd9ffe3ea9..., click "Blame" on the header bar over the file contents.
2. Scroll down to the line and click on the commit in the left column.
3. Scroll down to the file that removed the line from its previous file, activesupport/lib/active_support/test_case.rb.
4. Click the three-dots menu in that file's header bar and select "View file".
5. Click "History" in the header bar of the contributors, above the file contents.
6. I guessed here at commit 281f488 on its message: "Use the method provided by minitest to make tests order dependent". There's a comment here that identified the problem which led to, and provided context for, the change in 6ffb29d.
The OP is from minitest's documentation, so to find the introduction in minitest, it's basically the same process.
1. Go to https://github.com/minitest/minitest.
2. Search the repo for the method name. Even just "i_suck" will match the commit.
3. Select the oldest commit in the results. That's a4553e2.
-
Minitest, we've been doing it wrong?
The new test convention is now "test/**/test_*.rb" instead of "test/**/*_test.rb". For example, Puma and Minitest are popular repositories using this naming pattern.
-
Ask HN: Codebases with great, easy to read code?
https://github.com/seattlerb/minitest really removed the FUD for me when i started learning Ruby and Rails. Its full of metaprogramming and fancy tricks but is also quite small, practical and informal in its style.
e.g. "assert_equal" is really just "expected == actual" at it's core but it uses both both a block param (a kind of closure) for composing a default message and calls "diff" which is a dumb wrapper around the system "diff" utility (horrors!). There is even some evolved nastiness in there for an API change that uses the existing assert/refute logic to raise an informative message. this is handled with a simple if and not some sort of complex hard-to-follow factory pattern or dependency injection misuse.
https://github.com/seattlerb/minitest/blob/master/lib/minite...
-
49 Days of Ruby: Day 46 -- Testing Frameworks: Minitest
Those are just a few examples of what you can do with Minitest! Check out their README on GitHub and keep on exploring.
-
Ruby through the lens of Go
One of the things I love the most about Ruby is that it tends to coalesce around one or two really popular libraries. Rails is the big one obviously, but over time you see libraries designed for a particular purpose "winning" over other things. This includes things like linting/code analysis (Rubocop), authentication (Devise), testing (RSpec and Minitest) and more. The emphasis is on making something good great rather than making a lot of different good things.
-
Best way to learn testing in RSpec?
Then try minitest (unit and spec verisons) https://github.com/seattlerb/minitest
tigerbeetle
-
SQLite Helps You Do Acid
Indeed!
I was so glad to see you cite not only the Rebello paper but also Protocol-Aware Recovery for Consensus-Based Storage. When I read your first comment, I was about to reply to mention PAR, and then saw you had saved me the trouble!
UW-Madison are truly the vanguard where consensus hits the disk.
We implemented Protocol-Aware Recovery for TigerBeetle [1], and I did a talk recently at the Recurse Center diving into PAR, talking about the intersection of global consensus protocol and local storage engine. It's called Let's Remix Distributed Database Design! [2] and owes the big ideas to UW-Madison.
[1] https://github.com/coilhq/tigerbeetle
[2] https://www.youtube.com/watch?v=rNmZZLant9o
-
20 years of payment processing problems
> It sounds like payments might be part of the larger concept of declarative programming (DP)
Yes, exactly! The idea with TigerBeetle's state machine [1] is to expose double-entry accounting as higher level financial primitives, so that developers can think in terms of declaring transfers from one account to another. The business logic behind the scenes is detailed, but the interfaces and data structures are simple.
[1] https://github.com/coilhq/tigerbeetle/blob/main/src/state_ma...
> Maybe TigerBeetle could be generalized to support any multi-step distributed process?
That's part of the plan, that the distributed database framework of TigerBeetle can be used as a ”distributed Iron Man suit” to support any kind of state machine.
-
How Safe Is Zig?
It's a pleasure. Let me know if you have any more questions about TigerBeetle. Our design doc is also here: https://github.com/coilhq/tigerbeetle/blob/main/docs/DESIGN....
- TigerStyle – TigerBeetle's coding style guide
-
Distributed Systems Shibboleths
Surprisingly, some of the most powerful distributed systems algorithms or tools are actually deterministic. They're powerful because they can "load the dice" and so make the distributed system more intuitive for humans to reason about, more resilient to real world network faults, and do all this with more performance.
For example, Barbara Liskov and James Cowling's deterministic view change [1], which isn't plagued by the latency issues of RAFT's randomized dueling leader problem. Viewstamped Replication Revisited's deterministic view change can react to a failed primary much quicker than RAFT (heartbeat timeouts don't require randomized "padding" as they do in RAFT), commence the leader election, and also ensure that the leader election succeeds without a split vote.
Determinism makes all that possible.
Deterministic testing [2][3] is also your best friend when it comes to testing distributed systems.
[1] I did a talk on VSR, including the benefits of the view change — https://www.youtube.com/watch?v=Wii1LX_ltIs
[2] FoundationDB are pioneers of deterministic testing — https://www.youtube.com/watch?v=OJb8A6h9jQQ
[3] TigerBeetle's deterministic simulation tests — https://github.com/coilhq/tigerbeetle#simulation-tests
-
Lies we tell ourselves to keep using Golang
This is the chasm problem, where people don't use a technology because people aren't using that technology, thus the technology has difficulty gaining adoption. I did see that Zig does have it's own killer app and startup that's using Zig: TigerBeattle.
-
Ask HN: Codebases with great, easy to read code?
Control flow statements should always be on their own lines, then it's easy to find all of them by visually scanning top-down, without needing to look all the way down each line.
[1]: https://github.com/coilhq/tigerbeetle/blob/main/src/vsr/repl...
-
Database functions to wrap logic and SQL queries
> In hindsight, data logic should be in the database itself.
This is the reason we are creating TigerBeetle [1] at Coil, as an open source distributed financial accounting database, with the double entry logic and financial invariants enforced through financial primitives within the database itself.
This is all the more critical for financial data, because raw data consistency is not enough for financial transactions, you also need financial consistency, not to mention immutability.
The performance of doing it this way is also easier. For example, around a million financial transactions per second on commodity hardware, with p100 latency around 10-20ms.
[1] https://github.com/coilhq/tigerbeetle
-
Building Payment systems for the World at Hackathons
You probably already know this — because we’ve mentioned it a few times — but Coil champions and supports open-source projects and is privacy-first, by default. Over the years, Developer Relations at Coil has championed and sponsored teams that write Open Web Documentations and projects that empower open-source developers to get paid. Coil has also incubated many open-source projects like Tigerbeetle and Rafiki.
-
Durability and Redo Logging
[6] Partial logical sector reads/writes even when using O_DIRECT — https://github.com/coilhq/tigerbeetle/blob/main/src/storage....
What are some alternatives?
Test::Unit - test-unit
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
RSpec - RSpec meta-gem that depends on the other components
raft - Golang implementation of the Raft consensus protocol
Cucumber - A home for issues that are common to multiple cucumber repositories
Co-dfns - High-performance, Reliable, and Parallel APL
Pundit Matchers - A set of RSpec matchers for testing Pundit authorisation policies.
raft-grpc-example - Example code for how to get hashicorp/raft running with gRPC
shoulda-matchers - Simple one-liner tests for common Rails functionality
viewstamped-replication-made-famous - A $20k consensus challenge based on TigerBeetle's implementation of the pioneering Viewstamped Replication protocol. [Moved to: https://github.com/tigerbeetledb/viewstamped-replication-made-famous]
Aruba - Test command-line applications with Cucumber-Ruby, RSpec or Minitest.
LevelDB - LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.