changelog shortlog tags changeset manifest revisions annotate raw

spec/views/products/new.html.erb_spec.rb

changeset 18: b97ed3573af2
author: moriq <moriq@moriq.com>
date: Mon Mar 10 10:39:23 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: generate rspec_scaffold product.
1require File.dirname(__FILE__) + '/../../spec_helper'
2
3describe "/products/new.html.erb" do
4 include ProductsHelper
5
6 before(:each) do
7 @product = mock_model(Product)
8 @product.stub!(:new_record?).and_return(true)
9 assigns[:product] = @product
10 end
11
12 it "should render new form" do
13 render "/products/new.html.erb"
14
15 response.should have_tag("form[action=?][method=post]", products_path) do
16 end
17 end
18end
19
20