Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (31 sloc) 1.289 kB

Authlogic Example App

This is an example of how to test paperclip with cucumber. Base on {authlogic_example}(github.com/binarylogic/authlogic_example).

Setup

  1. git clone git://github.com/rainchen/authlogic_example.git authlogic_paperclip_example

  2. cd authlogic_paperclip_example

  3. cp config/database.yml.example config/database.yml

  4. rake db:migrate

  5. rake db:test:prepare

Run cucumber

cucumber -q

Feature: Manage users

In order to signup

Scenario: Register new user
  Given I am on the new user page
  When I fill in "Login" with "Rain"
  And I fill in "Password" with "mypass"
  And I fill in "Password confirmation" with "mypass"
  And I press "Register"
  Then I should see "Account registered!"

Scenario: Upload an image as avatar
  Given I am registered as "Rain/mypass"
  When I go to "/account/edit"
  And I attach the file "rails.png" to "avatar"
  And I press "Update"
  Then I should see "Account updated!"
  And the "avatar.file?" of the user which login is "Rain" should be "true"
  And the "avatar_file_size" of the user which login is "Rain" should not be blank

2 scenarios (2 passed) 13 steps (13 passed)

Copyright © 2009 {RainChen}(github.com/rainchen/authlogic_example), released under the MIT license

Jump to Line
Something went wrong with that request. Please try again.