Displaying 2 results from an estimated 2 matches for "baz_id".
Did you mean:
bar_id
2006 Jan 21
7
n-way joins
...e join tables
contain extra data as well.)
Let me give you my basic entities:
foos
id - pk
name - unique
bars
id - pk
name - unique
bazs
id - pk
name - unique
frozs
id - pk
name - unique
then i have two separate join tables:
foos_bars_bazs - 3 way join
foo_id\
bar_id > primary key/unique
baz_id/
value
foos_bars_bazs_frozs - 4 way join
froz_id\
foo_id \
bar_id \ primary key/unique
baz_id /
value
Now, my use cases for access are:
1. Given a foo, find all { bar, baz, value } associated with it (i''d
really like to get back bars and bazs, not just their ids)
2. Given a froz an...
2007 Jul 09
12
Mocking User.find( :all, :limit => 10 )
Hi,
I''m trying to setup a mock for my controller test but I can''t get it to
recognise the mock.
I use
it "should find all users" do
User.should_receive(:find).with( :all, :limit => 10
).and_return([@user])
do_get
end
and in the controller
@users = User.find(:all, :limit => 10 )
But this does not work. It gives me
User expected :find with (:all)