redding / assert Goto Github PK
View Code? Open in Web Editor NEWAssertion style testing framework.
Home Page: https://github.com/redding/assert
License: MIT License
Assertion style testing framework.
Home Page: https://github.com/redding/assert
License: MIT License
Just like context level ones, except suite-level, so they run when before the entire suite starts and after the suite is finished. I'd call/alias as 'before_once', 'after_once', 'setup_once', 'teardown_once'. Something like that.
~/.assert/options.rb or something like that
not sure what to show just yet.
too subjective.
Only ran into a couple issues, very minor:
rb.rb
. I saved this as rbcmd.rb
and brew gets upset about that. It's kinda obvious if you read the error message and the formula, but had to see it error first.rb l
and got the usage message for rb local
. So list
and local
are aliased the same in your example. I switched list
to use ls
and all is good.right now it has methods for getting the 'fail_results' and the 'error_results'. for consistancy, add methods for 'pass_results' and 'skip_results'.
The methods should take a message like the fail method. It should add the message to the result similarly.
just for clarity and cleanup and documentation help.
A feature of Shoulda I use all the time is mocking out my tests with should
statements, but not providing the blocks until I am ready to implement the test. Right now I just get an error saying I need to pass a block. It would be nice if when I call should
with no block it just shows as a skipped test.
it's optional - you can use it if you want or not.
let's discuss this. I think we should be consistant here and have args be passed to helpers in similar ways. For example, assert_equal is assert_equal <expectedval>, <testval>
. However assert_respond_to is assert_respond_to <testobj>, <expected>
. Let's chat on monday.
right now its not (in the context class). Need to right a test for this and get it passing.
Context should have a class method should that takes a string and a block. This should create a new test similarly to how a method named test_* works.
i think this is a better and more stable handler to build 3rd-party terminal views with.
The nice automatic rake test tasks generated have some strange behavior with Rake 0.9.2. This seems to be due to the fact that tests like rake test:context
are defined twice. With rake 0.9.2 this runs both and runs them separately which is odd. This needs to be cleaned up.
do it more like bundler
if user opts in to using the assert auto test tasks, go ahead and include Rake::DSL if defined for them so they don't get crappy rake warnings.
A context's and suite's setup and teardown methods should support being passed a string/symbol without a block. Rails test case extensions expect to be able to call setup and teardown in this manner so this should make it even more seamless.
alias of 'should'
right now the test suite is written using patterns only supported by test-unit (or assert itself). I'd like to port the test suite to super vanilla test-unit/minitest so that we can test assert independently of itself.
make more like test-belt, shoulda - open up for easy macro-ing
only show type and message
please.
This one is minor. The '.'s at the end of the test change order drastically every time I add a test. It is a little disorienting when I have a few 'S' tests and they shift all over the place each time I add a new assert statement to a test. It looks like Hash order behavior so it is likely not a problem in Ruby 1.9. If it is an easy fix I think deterministic ordering would be a nice polish.
TODOs
make them actually work by comparing type/message
Both Rails' ActionController and basic Rack::Test versions. Consider moving rails specific assert stuff into its own gem, 'assert-rails' or something. Want to keep the main 'assert' gem Rails' agnostic.
uhh, fix this.
we need docs baby. use docs to drive examples.
Optionally, capture std output and store with the result.
Both Rails specific and Rack::Test generic. Again, consider putting rails specific junk in own gem, 'assert-rails' or whatever.
does the same thing as 'should' but just skips
Wanted to write this down before I forget it. In test/helper.rb the top comment says "test_belt" instead of "assert".
pull from test-belt (shoulda) but I'd like to discuss a redesign to make it simpler.
please.
defaults to Terminal if now opt
going to use in the ignored assertion stuff we will do in Issue #5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.