Sha256: 4e20c04d7905c851b07e519cfaf72383f84e0936f111bd347579c373cf62ff0d

Contents?: true

Size: 513 Bytes

Versions: 2

Compression:

Stored size: 513 Bytes

Contents

require 'spec_helper'

describe "posts/new.html.erb" do
  before(:each) do
    assign(:post, stub_model(Post,
      :new_record? => true,
      :title => "MyString",
      :body => "MyText"
    ))
  end

  it "renders new post form" do
    render

    rendered.should have_selector("form", :action => posts_path, :method => "post") do |form|
      form.should have_selector("input#post_title", :name => "post[title]")
      form.should have_selector("textarea#post_body", :name => "post[body]")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bobby-0.0.4 spec/views/posts/new.html.erb_spec.rb
bobby-0.0.3 spec/views/posts/new.html.erb_spec.rb