Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Application meant to help develop tests for devise modules and cancan abilities.
Ruby Other
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
spec
vendor
.gitignore
.rspec
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Talisman

Pupose:

This is a test application meant to develop tests that can be applied to other applications.

Specifically it will test the Devise functionality and provide base tests that can be used, and expanded on, in other applications with very little modification. The hope is that this will ease the process of testing Devise for the specific functionality desired.

Also included are tests for using Cancan with Devise. Again the hope is provide base tests that can be used, and expanded on, in other applications with very little modification.

Update:

Currently updating this application for the most recent gems available. Due to changes with Rspec and Capybara all request specs are now red and will have to be reworked. In general, all tests are in need of an overhaul.

Notes:

Rspec: testing

Add to the Gemfile in test and development groups: gem 'rspec-rails' In the command line: bundle install rails g rspec:install If working on a windows platform remove --colour from .rspec to clean up messages.

Capybara: simulate interactions with browser

Add to the Gemfile in test group: gem 'capybara' In the command line: bundle install In spec_helper.rb: require 'capybara/rspec'

Spork: speed up running of tests

Add to the Gemfile in test group: gem 'spork-rails' In the command line: bundle install spork rspec --bootstrap Setup spec_helper.rb with prefork and each_run blocks.

Factory Girl: replaces fixtures with factories

Add to the Gemfile in test group: gem 'factory_girl_rails', '~> 3.0' In the command line: bundle install In spec_helper.rb include in the each_run block: FactoryGirl.reload Configure Rspec with syntax methods (in spec_helper.rb): Rspec.configure do |config| config.include FactoryGirl::Syntax::Methods end Create spec/support directory. Create factories.rb and use it to define factories.

Simple form: simplify forms

Add to the Gemfile: gem 'simple_form' In the command line: bundle install rails g simple_form:install --bootstrap Change form_for to simple_form_for to use with form.

Devise: authentication

Add to the Gemfile: gem 'devise' Optional: Add to Gemfile if you want custom encryptors: gem 'devise-encryptable' In the command line: bundle install rails g devise:install Configure devise and application as specified. Use the following command to generate models with devise. rails g devise rake db:migrate Use the following command to generate scoped views. rails g devise:views

TODO:

Resolve pending tests in user_confirmations_spec and user_rememberable_spec.

Something went wrong with that request. Please try again.