Sha256: 3c696fdfd7e36581fe465faccd2f9a7b5713778d13a54c601f17e5202a9150fe

Contents?: true

Size: 621 Bytes

Versions: 2

Compression:

Stored size: 621 Bytes

Contents

require 'spec_helper'

describe "posts/new" do
  before(:each) do
    assign(:post, stub_model(Post,
      :title => "MyString",
      :body => "MyText",
      :published => false
    ).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=?][method=?]", posts_path, "post" do
      assert_select "input#post_title[name=?]", "post[title]"
      assert_select "textarea#post_body[name=?]", "post[body]"
      assert_select "input#post_published[name=?]", "post[published]"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_token_authentication-1.0.0.pre.5 test/dummy/spec/views/posts/new.html.erb_spec.rb
simple_token_authentication-1.0.0.beta.5 test/dummy/spec/views/posts/new.html.erb_spec.rb