0.0
No commit activity in last 3 years
No release in over 3 years
A Jekyll library for Unit Testing
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 3.1.2
~> 1.8
 Project Readme

Joule 🔸 Build Status Gem Version Coverage Status

Joule is a Jekyll utility helper designed to make it (way) easier to write unit tests.

So far, Joule has only been tested with minitest. However, you should be able to use it with other testing frameworks.

Install

Add this line to your application's Gemfile:

gem 'jekyll-joule'

And then execute:

bundle

Or install it yourself as:

gem install jekyll-joule

Basic Usage

Below is an example of how you can write a test with Joule.

class ExampleTest < JekyllUnitTest
  should "render a div containing the Page title" do
    @joule.render(%Q[
      ---
      title: "Yiss"
      ---
      <div class="aww">
        {{ page.title }}
      </div>
    ])

    el = @joule.find(".aww")

    assert(el)
    assert(el.text.include?("Yiss"))
    assert(el["class"].include?("aww"))
  end
end

Check out the full rendering API documentation

Documentation

View the docs to get started with Joule!

Examples

View the example Jekyll setup + Joule test files.