On Oct 14, 2:14 pm, Frederick Cheung <[EMAIL PROTECTED]>
wrote:
> Create at least one test in that app and it should be fine.
>
> Fred
I created a basic unit test:
$ cat test/unit/foobar_test.rb
require File.dirname(__FILE__) + '/../test_helper'
class FoobarTest < Test::Unit::TestCase
def test_true
assert true, true
end
end
But when I ran the test, the development environment was loaded before
the test environment:
---START OUTPUT---
$ rake test:units
(in /Users/nick/src/test_plugin_env)
foobar > init.rb > RAILS_ENV = [development]
/opt/local/bin/ruby -Ilib:test "/opt/local/lib/ruby/gems/1.8/gems/
rake-0.8.1/lib/rake/rake_test_loader.rb" "test/unit/foobar_test.rb"
foobar > init.rb > RAILS_ENV = [test]
foobar > init.rb > test environment!
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/
rake_test_loader
Started
.
Finished in 0.216451 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
---END OUTPUT---
Why is the development environment loaded before the test environment?
Thanks,
Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---