Displaying 1 result from an estimated 1 matches for "valid_emailer_attribut".
Did you mean:
valid_emailer_attributes
2007 Apr 26
0
Shouldn't this spec fail?
...right to be the model in this case). Also, after_initialize doesn''t
seem to be the right way of doing this, but before_create or any of the
other things don''t make the first test pass.
specify "should provide a default name when none is given" do
@emailer.attributes = valid_emailer_attributes.except(:name)
@emailer.name.should_not_be_nil
@emailer.should_be_valid
end
specify "should not replace name if one is given" do
@emailer.attributes = valid_emailer_attributes # valid name attribute is
"bill"
(@emailer.name=="bill").should_be_true
end
clas...