-
-
Save dchelimsky/524607 to your computer and use it in GitHub Desktop.
class ClassProjectsController < ApplicationController | |
def new | |
end | |
end |
require 'test_helper' | |
class ClassProjectsControllerTest < ActionController::TestCase | |
test "GET new should render the new template" do | |
get new_class_project_path | |
assert_template "new" | |
end | |
end |
$ rake | |
(in /Users/dchelimsky/tmp/foo) | |
/Users/dchelimsky/.rvm/rubies/ruby-1.8.7-p299/bin/ruby -I"lib:test" "/Users/dchelimsky/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/helpers/class_projects_helper_test.rb" | |
Loaded suite /Users/dchelimsky/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader | |
Started | |
Finished in 0.000235 seconds. | |
0 tests, 0 assertions, 0 failures, 0 errors | |
/Users/dchelimsky/.rvm/rubies/ruby-1.8.7-p299/bin/ruby -I"lib:test" "/Users/dchelimsky/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/class_projects_controller_test.rb" | |
Loaded suite /Users/dchelimsky/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader | |
Started | |
E | |
Finished in 0.01398 seconds. | |
1) Error: | |
test_GET_new_should_render_the_new_template(ClassProjectsControllerTest): | |
ActionController::UnknownAction: No action responded to /class_projects/new. Actions: new | |
/test/functional/class_projects_controller_test.rb:5:in `test_GET_new_should_render_the_new_template' | |
1 tests, 0 assertions, 0 failures, 1 errors | |
/Users/dchelimsky/.rvm/rubies/ruby-1.8.7-p299/bin/ruby -I"lib:test" "/Users/dchelimsky/.rvm/gems/ruby-1.8.7-p299@global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" | |
Errors running test:functionals! |
ActionController::Routing::Routes.draw do |map| | |
map.resources :class_projects | |
map.connect ':controller/:action/:id' | |
map.connect ':controller/:action/:id.:format' | |
end |
I saw your tweet about this problem, and tweeted back (https://twitter.com/dchelimsky/status/21172405454) with a reference to this fork.
You are correct that rspec just runs on top of the rails test runner, adding rspec-specific decorations, but relying on the rails test runner to do much of the work. In this case, the problem is definitely in the rails test runner, so your best bet is to raise a ticket in the rails tracker (http://rails.lighthouseapp.com) and work with the rails folks to track it down and fix it.
I also so your other tweet about rspec causing you trouble. I welcome you to join the rspec-users mailing list/google group. Very friendly bunch who will be happy to help you get acclimated.
http://rubyforge.org/mailman/listinfo/rspec-users
http://groups.google.com/group/rspec
Thank you for your help, I will definitely follow up with the rails team and see what I do to help solve this issue.
I see you have forked this gist of mine. I am very new to both ruby and rails so I am not sure what you are displaying here. It seems to me that you are showing that the regular test runner has the same problem. Is it the case the rspec just runs on top of the regular test runner? How can I track down the source of the problem? I would happily work on this further and try and fix it but I need some direction with it. Do you have any suggestions?