Permalink
Browse files

making the shoulda macro actually... work

  • Loading branch information...
1 parent d11b60d commit 5e6e1fe3f160d217cce6a77e2ee9c47b8d15bc1f @croaky committed Nov 29, 2008
Showing with 5 additions and 4 deletions.
  1. +1 −1 README.textile
  2. +4 −3 shoulda_macros/webster.rb
View
@@ -24,7 +24,7 @@ h2. Shoulda macro
@word = subscription.set_activation_code
end
- should_be_webster_word @word
+ should_be_webster_word "@word"
h2. Authors
@@ -1,4 +1,4 @@
-module Webster
+class Webster
module Shoulda
# Example:
# context "Subscription#activation_code" do
@@ -7,10 +7,11 @@ module Shoulda
# @code = subscription.set_activation_code
# end
#
- # should_be_webster_word @code
+ # should_be_webster_word "@code"
#
def should_be_webster_word(word)
- should "be webster word #{word}" do
+ should "be webster word" do
+ word = eval word
assert_kind_of String, word,
"#{word} is not a string but is a #{word.class}."
assert_equal word, word.downcase,

0 comments on commit 5e6e1fe

Please sign in to comment.