gsinclair / dfect Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sunaku/detest
Assertion testing library for Ruby
License: ISC License
This project forked from sunaku/detest
Assertion testing library for Ruby
License: ISC License
gsinclair/dfect =============== Fork by Gavin Sinclair of Suraj N. Kurapati's 'dfect' testing library. Things I like about dfect: simplicity, minimalism, good design. Things I want to implement, with progress reports: * Minimal but useful output with meaningful failure messages - Completed in most/all cases; see below. - When asserting equality between two long strings, the _difference_ between them is indicated for easier debugging. * Colourful output - Completed in most/all cases. * (A few) more assertions, like Eq for asserting equality - The following are implemented (test/unit equivalent in brackets): + Eq (assert_equal) + N (assert_nil) + Mt (assert_match) - More to come as I need/want them. Not aiming to add everything under the sun, though! * Facility for user-added assertions - No work done on this. * Easily select the tests you want to run - No work done on this. * Easily run the debugger when certain tests are executing - The global variable $dfect_test is set to the description of the currently-running test, meaning you can insert a line into your code like this: debugger if $dfect_test =~ /generate HTML/ Output ------ Here is a "screenshot" of a test failure in the project I'm working on. Unfortunately it doesn't show the colour, which makes it much easier to read. See links [1]-[3] below for true screenshots showing the colour. FAIL: TopicDocument (resources) ./test/topic_document.rb 53 Eq r[0].category, "F" 54 Eq r[0].filetype, "PDF" => 55 Eq r[0].file_re, /^A030.+worksheet/ 56 Eq r[0].description, %{ 57 A summary of (nearly?) all the skills taught in this topic. Equality test failed Was: /^A030.+worksheet.pdf/ Exp: /^A030.+worksheet/ Backtrace ./test/topic_document.rb:55 test/_all.rb:19 [1] http://picasaweb.google.com/lh/photo/WyrF7D7I4sKnSNCz0RlBJw [2] http://picasaweb.google.com/lh/photo/N8kCnZ3U3wFqKBKKJM9Crg [3] http://picasaweb.google.com/lh/photo/7r2o1HWCjyEOhjc7o1nluQ Contact ------- gsinclair at gmail dot com
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.