Created
March 6, 2011 05:34
-
-
Save jamesbrink/857057 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class PatientsControllerTest < ActionController::TestCase | |
setup do | |
@patient = patients(:one) | |
end | |
test "actions without user" do | |
PatientsController.action_methods.each do |action| | |
get action | |
assert_redirected_to :login | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
james$ ruby -I test test/functional/patients_controller_test.rb | |
DEPRECATION WARNING: reorder is deprecated. Please use except(:order).order(...) instead. (called from <top (required)> at /Users/james/Desktop/AuXilium/RailsApps/CloudMD/config/application.rb:7) | |
Loaded suite test/functional/patients_controller_test | |
Started | |
E | |
Finished in 0.086666 seconds. | |
1) Error: | |
test_actions_without_user(PatientsControllerTest): | |
RuntimeError: can't modify frozen string | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_dispatch/http/parameters.rb:47:in `force_encoding' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_dispatch/http/parameters.rb:47:in `encode_params' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_dispatch/http/parameters.rb:59:in `block in encode_params' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_dispatch/http/parameters.rb:52:in `each' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_dispatch/http/parameters.rb:52:in `encode_params' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_dispatch/http/parameters.rb:12:in `parameters' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_controller/metal.rb:88:in `params' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_controller/test_case.rb:409:in `process' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_controller/test_case.rb:47:in `process' | |
/Users/james/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.4/lib/action_controller/test_case.rb:350:in `get' | |
test/functional/patients_controller_test.rb:10:in `block (2 levels) in <class:PatientsControllerTest>' | |
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips | |
Test run options: --seed 15080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment