An open API service indexing awesome lists of open source software.

https://github.com/sixarm/sixarm_ruby_application_controller_mock

SixArm.com » Ruby » ApplicationController mock for Rails
https://github.com/sixarm/sixarm_ruby_application_controller_mock

applicationcontroller gem mock rails ruby

Last synced: 2 months ago
JSON representation

SixArm.com » Ruby » ApplicationController mock for Rails

Awesome Lists containing this project

README

          

# SixArm.com » Ruby »
ApplicationController mock for Rails

[![Gem Version](https://badge.fury.io/rb/sixarm_ruby_application_controller_mock.svg)](http://badge.fury.io/rb/sixarm_ruby_application_controller_mock)
[![Build Status](https://travis-ci.org/SixArm/sixarm_ruby_application_controller_mock.png)](https://travis-ci.org/SixArm/sixarm_ruby_application_controller_mock)
[![Code Climate](https://api.codeclimate.com/v1/badges/d32fc8a9f742fed7e2d6/maintainability)](https://codeclimate.com/github/SixArm/sixarm_ruby_application_controller_mock/maintainability)

* Git:
* Doc:
* Gem:
* Contact: Joel Parker Henderson,
* Project: [changes](CHANGES.md), [license](LICENSE.md), [contributing](CONTRIBUTING.md).

## Introduction

ApplicationController mock object for testing Rails.

This provides a flash hash, params hash, and session hash.

For docs go to

Want to help? We're happy to get pull requests.

## Install

### Gem

To install this gem in your shell or terminal:

gem install sixarm_ruby_application_controller_mock

### Gemfile

To add this gem to your Gemfile:

gem 'sixarm_ruby_application_controller_mock'

### Require

To require the gem in your code:

require 'sixarm_ruby_application_controller_mock'

## Example

require 'application_controller_mock'
class FoosController < ApplicationController
def whatever
session[:hello]=world
end
end

## Example with intialize hash

foo = ApplicationConroller.new(:params=>{:a=>:b,:c=>:d)})