Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An example for testing paperclip with cucumber

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Capfile
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
README.rdoc

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

Something went wrong with that request. Please try again.