Sha256: 1c6d72c663f1fbbc9e3553cdbb7f9b2589be187ec2ada0d4af5d786558ad2935

Contents?: true

Size: 597 Bytes

Versions: 5

Compression:

Stored size: 597 Bytes

Contents

require 'test_helper'

class <%= controller_class_name %>ControllerTest < ActionController::TestCase

  context "The <%= controller_class_name %>Controller" do

  	setup do
  		@<%= file_name %> = <%= class_name %>.make
  	end

		context 'GET to index' do
		  setup do
		    get :index
		  end
		  should_respond_with :success
		  should_assign_to :<%= table_name %>
		end


		context 'GET to show' do
		  setup do
		    get :show, :id => @<%= file_name %>.to_param
		  end
		  should_respond_with :success
		  should_render_template :show
		  should_assign_to :<%= file_name %>
		end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shoulda_machinist_generator-0.4.4 rails_generators/shoulda_machinist_admin_scaffold/templates/functional_test.rb
shoulda_machinist_generator-0.4.3 rails_generators/shoulda_machinist_admin_scaffold/templates/functional_test.rb
shoulda_machinist_generator-0.4.2 rails_generators/shoulda_machinist_admin_scaffold/templates/functional_test.rb
shoulda_machinist_generator-0.4.1 rails_generators/shoulda_machinist_admin_scaffold/templates/functional_test.rb
shoulda_machinist_generator-0.4.0 rails_generators/shoulda_machinist_admin_scaffold/templates/functional_test.rb