Sha256: bd34bc462263fca299bd31947f47c276e095b01968cc7e6286e37f6f4b26e736

Contents?: true

Size: 724 Bytes

Versions: 6

Compression:

Stored size: 724 Bytes

Contents

require 'spec_helper'

describe "users/new" do
  before(:each) do
    assign(:user, stub_model(User,
      :first_name => "MyString",
      :last_name => "MyString",
      :email => "MyString",
      :phone => 1
    ).as_new_record)
  end

  it "renders new user form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form[action=?][method=?]", users_path, "post" do
      assert_select "input#user_first_name[name=?]", "user[first_name]"
      assert_select "input#user_last_name[name=?]", "user[last_name]"
      assert_select "input#user_email[name=?]", "user[email]"
      assert_select "input#user_phone[name=?]", "user[phone]"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mail_manager-3.0.0 spec/test_app/spec/views/users/new.html.erb_spec.rb
mail_manager-0.1.4 spec/test_app/spec/views/users/new.html.erb_spec.rb
mail_manager-0.1.2 spec/test_app/spec/views/users/new.html.erb_spec.rb
mail_manager-0.1.1 spec/test_app/spec/views/users/new.html.erb_spec.rb
mail_manager-0.1.0 spec/test_app/spec/views/users/new.html.erb_spec.rb
mail_manager-0.0.1 spec/test_app/spec/views/users/new.html.erb_spec.rb