RoR中怎么写controller测试用例才能全覆盖?

RoR中怎么写controller测试用例才能全覆盖?

各位大虾:我在写RoR的功能php?name=%B2%E2%CA%D4" onclick="tagshow(event)" class="t_tag">测试用例,php?name=%B2%E2%CA%D4" onclick="tagshow(event)" class="t_tag">测试controller,遇到如下的代码,php?name=%B2%E2%CA%D4" onclick="tagshow(event)" class="t_tag">测试用例里第二个分支覆盖不到,郁闷,望帮忙,多谢!!
controller里代码如下:
def create
  @customer_id = CustomerId.new(params[:customer_id])
  if @customer_id.save
  flash[:notice] = 'Successfully created.'
  redirect_to :action => 'list'
  else
  render :action => 'new'
  end
end

我写的功能测试代码如下,只能覆盖到一个save成功的分支,另外一个save失败的分支实在是想不出怎么才能覆盖了,大家帮帮忙呀,多谢多谢!!
 # Test create method with save.
 def test_create_with_save
  num_customer = CustomerId.count
  post :create, :customer_id => {}
  assert_response :redirect
  assert_redirected_to :action => 'list'
  assert_equal num_customer + 1, CustomerId.count
 end

http://git.caboo.se/?p=altered_b ... 84babfe92fa;hb=HEAD