Browse files

adding documentation to README for shoulda macro

  • Loading branch information...
1 parent e1acdb0 commit bca5151e001e950ee4982a7995fec1376df82420 @croaky committed Nov 28, 2008
Showing with 12 additions and 2 deletions.
  1. +10 −0 README.textile
  2. +2 −2 shoulda_macros/webster.rb
View
10 README.textile
@@ -16,6 +16,16 @@ h2. Usage
=> "spoonless"
+h2. Shoulda macro
+
+ context "Subscription#activation_code" do
+ setup do
+ subscription = Factory :subscription
+ @word = subscription.set_activation_code
+ end
+
+ should_be_webster_word @word
+
h2. Authors
Webster was written for "Umbrella Today?":http://umbrellatoday.com by "thoughtbot":http://giantrobots.thoughtbot.com. It was extracted into a stand-alone Ruby gem by "Dan Croak":http://dancroak.com.
View
4 shoulda_macros/webster.rb
@@ -4,10 +4,10 @@ module Shoulda
# context "Subscription#activation_code" do
# setup do
# subscription = Factory :subscription
- # word = subscription.set_activation_code
+ # @code = subscription.set_activation_code
# end
#
- # should_be_webster_word word
+ # should_be_webster_word @code
#
def should_be_webster_word(word)
should "be webster word #{word}" do

0 comments on commit bca5151

Please sign in to comment.