Thanks for your reply.
On Oct 25, 6:07 am, bonyfish choi <[email protected]> wrote:
> hi,drewB
> first,I don't agree about the code of create method,use another
> method name seems better.
Why don't you agree?
> second,you mentioned that "objective.class" will return Hash? It's
> impossible,Objective#create return a instance of Objective or nil~~
I agree it is very strange but the log file clearly shows that it is
returning a Hash (so are the error messages I get when I try to call a
method).
> finally,show out your code about Rspec,please~
#I am using machinist. Objective.plan returns a hash with values I
specify elsewhere
it "should return objective when create called" do
obj = Objective.create(Objective.plan, 5)
obj.class.to_s.should == "Objective"
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---