Sha256: a3587ebc017d11a6490c803bce71a61a6c282a3c45c95c7def716596dd90438b

Contents?: true

Size: 970 Bytes

Versions: 10

Compression:

Stored size: 970 Bytes

Contents

require 'spec_helper'

describe "templates/new" do
  before(:each) do
    assign(:template, stub_model(Template,
      :body => "MyText",
      :path => "MyString",
      :format => "MyString",
      :locale => "MyString",
      :handler => "MyString",
      :partial => false
    ).as_new_record)
  end

  it "renders new template form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => templates_path, :method => "post" do
      assert_select "textarea#template_body", :name => "template[body]"
      assert_select "input#template_path", :name => "template[path]"
      assert_select "input#template_format", :name => "template[format]"
      assert_select "input#template_locale", :name => "template[locale]"
      assert_select "input#template_handler", :name => "template[handler]"
      assert_select "input#template_partial", :name => "template[partial]"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuztuscms-0.0.10 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.9 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.8 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.7 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.6 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.5 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.4 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.3 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.2 spec/views/kuztuscms/templates/new.html.erb_spec.rb
kuztuscms-0.0.1 spec/views/kuztuscms/templates/new.html.erb_spec.rb