summaryrefslogtreecommitdiff
path: root/spec/views/tournaments/new.html.erb_spec.rb
blob: 49785a4f7ed1f0048582b4c44820b677b2d97c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'spec_helper'

describe "tournaments/new" do
  before(:each) do
    assign(:tournament, stub_model(Tournament,
      :game => nil
    ).as_new_record)
  end

  it "renders new tournament form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form[action=?][method=?]", tournaments_path, "post" do
      assert_select "input#tournament_game[name=?]", "tournament[game]"
    end
  end
end