Project

Bacon_Rack

0.0
No commit activity in last 3 years
No release in over 3 years
Provides helpers for your Bacon specs using rack-test: :renders, :redirects_to, :renders_assets. Read more at the homepage.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Bacon_Rack

A Ruby gem providing helper methods for your Bacon and rack/test specs.

Installation

gem install Bacon_Rack

Usage

require 'Bacon'
require 'rack/test'
require "Bacon_Rack"


...

  it 'renders a message' do
    get "/missing-page"
    renders 404, "my message"
  end

  it 'redirects to other page' do
    get "/redirect-page"
    redirects_to "/page"
    redirects_to 304, "/page"
  end

  it 'renders js/css/gif/jpg assets' do
    get '/my-bueatiful page'

    renders_assets 
    # response of asset link must be within 200..310
    # response HTTP code.
  end

The source code is one page long if you have more questions: Source Code.

Run Tests

git clone git@github.com:da99/Bacon_Rack.git
cd Bacon_Rack
bundle update
bundle exec bacon spec/lib/main.rb

"I hate writing."

If you know of existing software that makes the above redundant, please tell me. The last thing I want to do is maintain code.