Sha256: f18621b0c585c8a328249bdaa4b22143f7d0a35cc112eb69acc24e035d45205d

Contents?: true

Size: 868 Bytes

Versions: 7

Compression:

Stored size: 868 Bytes

Contents

require 'spec_helper'

describe "users/new.html.erb" do
  before(:each) do
    assign(:user, stub_model(User,
      :new_record? => true,
      :name => "MyString",
      :nickname => "MyString",
      :image => "MyString",
      :description => "MyString",
      :location => "MyString"
    ))
  end

  it "renders new user form" do
    render

    # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
    assert_select "form", :action => users_path, :method => "post" do
      assert_select "input#user_name", :name => "user[name]"
      assert_select "input#user_nickname", :name => "user[nickname]"
      assert_select "input#user_image", :name => "user[image]"
      assert_select "input#user_description", :name => "user[description]"
      assert_select "input#user_location", :name => "user[location]"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
echo_base-0.1.3 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb
echo_base-0.1.2 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb
echo_base-0.1.1 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb
echo_base-0.1.0 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb
echo_base-0.0.4 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb
echo_base-0.0.3 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb
echo_base-0.0.2 lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb