public
Fork of courtenay/altered_beast
Description: Ground-up rewrite of Beast, a Ruby on Rails forum.
Homepage: http://activereload.lighthouseapp.com/projects/7537-altered-beast/
Clone URL: git://github.com/technoweenie/altered_beast.git
Updated Moderatorship attribute requirement test to continue to use 
model_stubbing.
nbibler (author)
Thu Apr 24 19:14:47 -0700 2008
commit  e6d99ce25c13ce2ce24e0880acb6d98713065813
tree    a10e239c61ddb46464f14dbede50dae29f0d216d
parent  ce0fa8c69cc36501416949608cb88227139eb3db
...
23
24
25
26
 
27
28
 
29
30
31
 
32
33
34
...
23
24
25
 
26
27
 
28
29
30
 
31
32
33
34
0
@@ -23,12 +23,12 @@ describe Moderatorship do
0
     forums(:other).moderators(true).should == [users(:default)]
0
   end
0
   
0
- %w(user_id forum_id).each do |attr|
0
+ %w(user forum).each do |attr|
0
     it "requires #{attr}" do
0
- mod = Moderatorship.new
0
+ mod = new_moderatorship(:default)
0
       mod.send("#{attr}=", nil)
0
       mod.should_not be_valid
0
- mod.errors.on(attr).should_not be_nil
0
+ mod.errors.on("#{attr}_id".to_sym).should_not be_nil
0
     end
0
   end
0
   

Comments

    No one has commented yet.