docs.rs failed to build shiny-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Ooh, shiny!

Build Status

Shiny makes you less distracted with copying over initializarion code in test cases. It also has a fancy syntax similar to ruby's rspec or Objective-C's kiwi.

Installation

Install in usual way with cargo.

Usage

Add shiny crate:

#![feature(phase)]
#[cfg(test)] #[phase(plugin,link)] extern crate shiny;

Write your shiny test case:

#[cfg(test)]
mod test {
  describe!(
    before_each {
      let awesome = true;
    }

    it "is awesome" {
      assert!(awesome);
    }

    it "injects before_each into all test cases" {
      let still_awesome = awesome;
      assert!(still_awesome);
    }
  )
}

all the items from before_each are inserted as is into generated test case functions. Mind the final semicolon in before_each block!

TODO

  • add support for context to do recursive prologue injections
  • better filtering for test case name

License

Shiny is distributed under Apache-2.0, see LICENSE for more details.