Sha256: 30b179c45002870e74f54061fb066b50f193a21db56fc5c66a96b0ffdbd3c5db
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
# Petitest::DSL DSL for [Petitest](https://github.com/petitest/petitest-dsl). ## Installation Add this line to your application's Gemfile: ```ruby gem "petitest-dsl" ``` And then execute: ```bash bundle ``` Or install it yourself as: ```bash gem install petitest-dsl ``` ## Usage Require `"petitest/dsl"` and extend `Petitest::DSL` into your test class. ```ruby require "petitest/autorun" require "petitest/dsl" class ExampleTest < Petitest::Test extend ::Petitest::DSL # ... your tests ... end ``` ### .desc Set a description to the following test. ```ruby desc "description for this test" def test_foo assert { foo } end ``` ### .test Define a test with a given description. ```ruby test "description for this test" do assert { foo } end ``` Define a skkipped test. ```ruby test "description for this test" ``` ### .sub_test Nest test groups. ```ruby sub_test "bar" do test "baz" do assert { baz } end sub_test "boo" do test "boz" do assert { boz } end end end ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
petitest-dsl-0.3.0 | README.md |