Displaying 2 results from an estimated 2 matches for "language_nam".
Did you mean:
language_name
2007 Jul 18
10
Rails - Mock going out of scope?
...e it
highlighted. I have pasted it below as well.
Basically, I have an acts_as_nested_set model called "Node", which
works fine. I have a function which finds the language name of the
node instance. If the language is nil for the node instance being
queried, it then recursively calles language_name on it''s parent until
one of them has the language. Then this gets returned.
When I do this with a fixture, it works fine. Ie, a Database call can
be made to a language table and I get the language name.
In the code attached it has a langauge instance being mocked. I get
the same resu...
2011 Jul 11
36
has_many and belongs_to association
Hi ,
I want to test the one below but I got the problem
belongs_to :name, :class_name => "Phrase", :foreign_key => "name"
in my test
context "test"do
should have_many :phrases
end
in language.rb
belongs_to :name, :class_name => "Phrase", :foreign_key => "name"
error is
1) Failure:
test: check has_many and belongs_to