Skip to content

SixArm/sixarm_ruby_application_controller_mock

Repository files navigation

SixArm.com » Ruby »
ApplicationController mock for Rails

Gem Version Build Status Code Climate

Introduction

ApplicationController mock object for testing Rails.

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

For docs go to http://sixarm.com/sixarm_ruby_application_controller_mock/doc

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)})

Releases

No releases published

Packages

No packages published

Languages