Skip to content

Instantly share code, notes, and snippets.

@onedesign
Created August 12, 2009 17:32
Show Gist options
  • Save onedesign/166629 to your computer and use it in GitHub Desktop.
Save onedesign/166629 to your computer and use it in GitHub Desktop.
# system_controller.rb
class Admin::SystemController < Admin::AdminController
def edit
@system = System.find(params[:id])
end
end
# system_controller_test.rb
require File.dirname(__FILE__) + '/../../test_helper'
class Admin::SystemControllerTest < ActionController::TestCase
setup :fake_login
context "GET to :edit" do
setup { get :edit }
should_render_template :edit
should_assign_to :system
should_respond_with :success
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment