Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An example for testing paperclip with cucumber
Ruby
branch: master

This branch is 5 commits ahead of binarylogic:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db/migrate
doc
features
lib/tasks
public
script
test
vendor/plugins/paperclip
.gitignore
Capfile
README.rdoc
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.