Giter VIP home page Giter VIP logo

assert's People

Contributors

jcredding avatar kellyredding avatar riddochc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

riddochc

assert's Issues

add suite level setup, teardown type methods

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.

Minor documentation updates

Only ran into a couple issues, very minor:

  • With the brew formula, I'd recommend you add something about saving the file as 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.
  • Your example cmd aliases have a duplicate for the alias 'l'. I copied in the aliases and ran 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.

ignored assertion macros

  • look at 1.8.7 test-unit, 1.9 minitest
  • do some meth missing action for any assertion helpers we are choosing to not implement
  • have them raise a new type of result called 'ignored' or something
  • this is so that it won't break backwards compatibility, but at the same time we don't have to implement every little helper the old libs do.
  • if we ever decide to implement more macros, we just do it and take them out of the ignored ones.

user options

  • look for a ~/.assert file or something
  • put JSON settings in there
  • have assert parse those settings and apply at suite load time
  • setting could include
    ** specify custom view classes to use
    ** color output or no?
    ** override colors for different results
    ** focus mode or no?
    ** run tests in parrallel or no? how many cores to use?

`should` with no block behave like `should_eventually`?

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.

assert helpers args not consistant??

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.

Add should method to context

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.

Rake task problems

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.

context 'subject' method

  • class meth version should take a block
  • instance meth version should eval the block in the scope of the context and return the blocks return value
  • look to test-beltv2.0 for reference

Support setup and teardowns calls without a block

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.

convert test suite to super basic test-unit/minitest

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.

Results in inconsistent order

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.

Functional testing contexts

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.

context assertion macros

  • assert_equal
  • assert_raises
  • etc
  • decide and implement certain common and basic assertion macros/helpers

capture std output and show with test results

Optionally, capture std output and store with the result.

  • capture any std output that is accumulated with the test as it runs.
  • when displaying test results, show the std output accumulated with any result details.
  • display nicely please.

Integration test Contexts

Both Rails specific and Rack::Test generic. Again, consider putting rails specific junk in own gem, 'assert-rails' or whatever.

implement context descriptions

  • add a 'desc' context class meth that takes a string
  • the context desc string should be built honoring nested contexts
  • should be prepended to the names of any tests for the context
  • should be totally optional
  • look to test-belt v2.0 for reference

create should macros

pull from test-belt (shoulda) but I'd like to discuss a redesign to make it simpler.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.