Sha256: a75cb1ae6f86288fccbf2b6ed9c46e5c35b31cad3bd24213bf14224cc713df4b

Contents?: true

Size: 661 Bytes

Versions: 2

Compression:

Stored size: 661 Bytes

Contents

  describe "the edit page" do

    before :each do
      @<%= singular_name %> = mock_record <%= class_name %>
      get :edit, :id => @<%= singular_name %>.to_param
    end

    it { should route(:get, edit_<%= singular_name %>_path(@<%= singular_name %>)).to(:action => :edit, :id => @<%= singular_name %>.to_param) }
    it { should respond_with(:success) }
    it { should render_template(:edit) }
    it { should_not set_the_flash }
    it { should assign_to(:<%= singular_name %>).with(@<%= singular_name %>) }
    it { should have_form_to(<%= singular_name %>_path(@<%= singular_name %>)) }
    it { should have_link_to(<%= plural_name %>_path) }

  end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iain-pizza-generators-0.1.3 rails_generators/pizza_scaffold/templates/tests/rspec/actions/edit.rb
iain-pizza-generators-0.1.4 rails_generators/pizza_scaffold/templates/tests/rspec/actions/edit.rb