Return to Snippet

Revision: 4480
at January 31, 2008 21:19 by vanne


Updated Code
# simple wrappers for running unit and functional tests in rails apps
# INSTEAD OF : ruby test/unit/user_test.rb
# DO THIS : test_unit user
test_unit () {
	if [[ -n "$1" ]]; then
		ruby test/unit/$1_test.rb;
	else
		"USAGE : test_unit [name_of_test]"
	fi
}

# INSTEAD OF : ruby test/functional/users_controller_test.rb
# DO THIS : test_func user
test_func () {
	if [[ -n "$1" ]]; then
		ruby test/functional/$1_controller_test.rb;
	else
		"USAGE : test_func [name_of_test]"
	fi
}

Revision: 4479
at December 19, 2007 15:56 by vanne


Initial Code
# simple wrappers for running unit and functional tests in rails apps
# INSTEAD OF : ruby test/unit/user_test.rb
# DO THIS : test_unit user
test_unit () {
	if [[ -n "$1" ]]; then
		ruby test/unit/$1_test.rb;
	else
		"USAGE : test_unit [name_of_test]"
	fi
}

# INSTEAD OF : ruby test/functional/users_controller_test.rb
# DO THIS : test_func user
test_func () {
	if [[ -n "$1" ]]; then
		ruby test/functional/$1_controller_test.rb;
	else
		"USAGE : test_func [name_of_test]"
	fi
}

Initial URL

                                

Initial Description

                                

Initial Title
Bash functions for running rails unit and functional tests

Initial Tags
Bash, rails, ruby

Initial Language
Bash