Displaying 1 result from an estimated 1 matches for "test_asset".
Did you mean:
test_assert
2007 Jun 26
4
Can I stub a method on a belongs_to association:
describe Asset, " when destroyed" do
fixtures :assets, :videos, :sites, :publish_settings
before(:each) do
@asset = assets(:test_asset)
@mock_hook = mock("hook")
@asset.video.stub!(:hook).and_return @mock_hook # error occurs here
end
it "should call the delete hook" do
@mock_hook.should_receive(:update).with("test_video", :asset_id =>
@assetid, :asset_action => "destroy&q...