github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

seanhussey / woulda

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 74
    • 10
  • Source
  • Commits
  • Network (10)
  • Issues (0)
  • Downloads (2)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (2)
    • v0.2.2
    • v0.2.1
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Woulda been in Shoulda, but ain't. — Read more

  cancel

http://github.com/seanhussey/woulda/tree/master

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Regenerated gemspec for version 0.2.2 
seanhussey (author)
Wed Feb 25 14:33:56 -0800 2009
commit  3a37c4c093076d10dde68b151f672848db3c6149
tree    7e7c7097a1176a3d4755801aedb7d5ff1035bd17
parent  a11230d1d9089a702cd7a8c72453e831e3a9ee02
woulda /
name age
history
message
file .gitignore Mon Sep 29 17:44:08 -0700 2008 Version bump. Added .gitignore for pkg. [technicalpickles]
file LICENSE Sat Jan 17 13:23:33 -0800 2009 Adding Josh to the LICENSE Copyright. [seanhussey]
file README.textile Tue Dec 30 08:19:01 -0800 2008 update readme with acts_as_xapian macro [hardbap]
file Rakefile Sat Jan 17 13:26:24 -0800 2009 Converting to jeweler. Wow, why isn't everybody... [seanhussey]
file VERSION.yml Wed Feb 25 14:33:53 -0800 2009 Version bump to 0.2.2 [seanhussey]
directory lib/ Wed Feb 25 14:31:05 -0800 2009 I'm a retard Signed-off-by: Sean Hussey <sean@... [bcardarella]
directory shoulda_macros/ Mon Sep 29 17:43:08 -0700 2008 Removed shoulda_act_as_paranoid.rb. Added would... [technicalpickles]
directory test/ Mon Jan 19 14:35:26 -0800 2009 I had a feeling there was something fishy when ... [webmat]
file woulda.gemspec Wed Feb 25 14:33:56 -0800 2009 Regenerated gemspec for version 0.2.2 [seanhussey]
README.textile

woulda

Testing is love. Especially when done with Shoulda. Shoulda makes testing your Rails app pretty easy.

There are tons of Rails plugins and gems out there. It should be easy to test your Rails app that uses these as well. That kind of support doesn’t really belong in Shoulda itself, though.

That’s where Woulda comes in.

Installing

It’s available as a gem:

gem install seanhussey-woulda —source http://gems.github.com

Use it in a Rails app by placing in config/environments/test.rb:

config.gem 'seanhussey-woulda', :lib => 'woulda', :source => 'http://gems.github.com'

Woulda requires shoulda >= 2.0.0.

Included Macros

# acts_as_ferret
class PostTest < Test::Unit::TestCase
  should_act_as_ferret :title, :contents
end

# acts_as_list
class NewsItemTest < Test::Unit::TestCase
  should_act_as_list
end

# acts_as_paranoid
class DocumentTest < Test::Unit::TestCase
  should_act_as_paranoid
end

# acts_as_taggable_on_steroids
class PersonTest < Test::Unit::TestCase
  should_act_as_taggable_on_steroids
end

# attachment_fu
class ImageTest < Test::Unit::TestCase
  should_have_attachment :content_type => :image
end

# enumeration_mixin
class RoleTest < Test::Unit::TestCase
  should_act_as_enumerated
end

# paperclip
class UserTest < Test::Unit::TestCase
  should_have_attached_file :avatar
end

# will_paginate
class PostTest < Test::Unit::TestCase
  should_have_per_page 10
end

# acts_as_solr
class ProductTest < Test::Unit::TestCase
  should_act_as_solr :name, :price
end

# acts_as_xapian
class ProductTest < Test::Unit::TestCase
  should_act_as_xapian :name, :description
end 

# acts_as_state_machine
class OrderTest < Test::Unit::TestCase
  should_act_as_state_machine :initial => :open, :states => [:closed], :events => {:close_order => {:to => :closed, :from :open}}
end

The source

The source is available from GitHub.

Clone it:

git clone git://github.com/seanhussey/woulda.git

Credit

Written by Sean Hussey and Josh Nichols

Copyright 2008 Sean Hussey and Josh Nichols.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server