Sha256: 1aa0a47479f43f2d7f558dd7bef91c3551b2c0d71698a866f8b0fcf05a06d682

Contents?: true

Size: 527 Bytes

Versions: 4

Compression:

Stored size: 527 Bytes

Contents

require 'spec_helper'

describe "posts/new" do
  before(:each) do
    assign(:post, stub_model(Post,
      :title => "MyString",
      :body => "MyString"
    ).as_new_record)
  end

  it "renders new post form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => posts_path, :method => "post" do
      assert_select "input#post_title", :name => "post[title]"
      assert_select "input#post_body", :name => "post[body]"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ampere-1.2.3 example/spec/views/posts/new.html.erb_spec.rb
ampere-1.2.2 example/spec/views/posts/new.html.erb_spec.rb
ampere-1.2.1 example/spec/views/posts/new.html.erb_spec.rb
ampere-1.2.0 example/spec/views/posts/new.html.erb_spec.rb