Are you guys running unit tests in rails? I can’t figure out what I am
doing
wrong…
ir -S rails newapp
ir -S script\generate controller customer
ir -S script\generate model user email:string
ir -S rake db:migrate
ir -S rake test
Fails with below output.
I had some debug print statements that I left in there in case it was
useful
(Frameworks, Caller)
(in c:/Code/newapp)
Frameworks: [:active_record, :action_controller, :action_view,
:action_mailer, :active_resource]
Caller:
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in
process'C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send’C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
run'c:/Code/newapp/config/environment.rb:9C:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in
require’C:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in
require'C:/ironruby/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require’C:/ironruby/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
new_constants_in'C:/ironruby/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require’C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain'C:/ironruby/lib/ruby/1.8/monitor.rb:242:in
mon_synchronize’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
invoke_prerequisites’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
invoke_prerequisites’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain'C:/ironruby/lib/ruby/1.8/monitor.rb:242:in
mon_synchronize’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
invoke_prerequisites’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
invoke_prerequisites’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain'C:/ironruby/lib/ruby/1.8/monitor.rb:242:in
mon_synchronize’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
invoke_prerequisites’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
invoke_prerequisites’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
invoke_with_call_chain'C:/ironruby/lib/ruby/1.8/monitor.rb:242:in
mon_synchronize’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke’C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/testing.rake:45IronRuby.Libraries:0:in
<Map>b__3'IronRuby.Libraries:0:in
each’IronRuby.Libraries:0:in
Each'C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/testing.rake:43:in
collect’C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/testing.rake:43C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain'C:/ironruby/lib/ruby/1.8/monitor.rb:242:in
mon_synchronize’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
run'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31C:/ironruby/bin/rake:19:in
load’C:/ironruby/bin/rake:19
Require active_record
HI
Require action_controller
Require action_view
Require action_mailer
Require active_resource
C:/ironruby/bin/ir.exe -I"lib;test"
“C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
“test/unit/user_test.rb” “test/unit/helpers/customer_helper_test.rb”
Frameworks: [:active_record, :action_controller, :action_view,
:action_mailer, :active_resource]
Caller:
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in
process'C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send’C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
run'c:/Code/newapp/config/environment.rb:9test/test_helper.rb:2:in
require’test/test_helper.rb:2./test/unit/user_test.rb:1:in
require'./test/unit/user_test.rb:1C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
load’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 Require active_record C:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
require’: can’t convert nil into String (TypeError)
from
C:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
require' from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:272:in
require_frameworks’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:270:in
each' from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:270:in
require_frameworks’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in
process' from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
run' from c:/Code/newapp/config/environment.rb:9 from test/test_helper.rb:2:in
require’
from test/test_helper.rb:2
from ./test/unit/user_test.rb:1:in require' from ./test/unit/user_test.rb:1 from C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
load’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
`each’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
C:/ironruby/bin/ir.exe -I"lib;test"
“C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
“test/functional/customer_controller_test.rb”
Frameworks: [:active_record, :action_controller, :action_view,
:action_mailer, :active_resource]
Caller:
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in
process'C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send’C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
run'c:/Code/newapp/config/environment.rb:9test/test_helper.rb:2:in
require’test/test_helper.rb:2./test/functional/customer_controller_test.rb:1:in
require'./test/functional/customer_controller_test.rb:1C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
load’C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
each'C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 Require active_record C:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
require’: can’t convert nil into String (TypeError)
from
C:/ironruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
require' from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:272:in
require_frameworks’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:270:in
each' from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:270:in
require_frameworks’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:134:in
process' from C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
run' from c:/Code/newapp/config/environment.rb:9 from test/test_helper.rb:2:in
require’
from test/test_helper.rb:2
from ./test/functional/customer_controller_test.rb:1:in
require' from ./test/functional/customer_controller_test.rb:1 from C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
load’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
`each’
from
C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
C:/ironruby/bin/ir.exe -I"lib;test"
“C:/ironruby/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
Errors running test:units and test:functionals!