D
Dan Bikle
People,
I'm trying to run the ruby debugger against a Test::Unit::TestCase class
which is a parent of a Rails class.
I started my study with a simple script:
#
# bikle_test.rb
#
require 'test/unit'
class BikleTest < Test::Unit::TestCase
def setup
@string10 =3D "hello"
end
def test10
assert_equal @string10, "hello"
end
end
The following command line works great:
ruby -r debug bikle_test.rb
Next, I create a new rails application with this command line:
rails rtest
Then, I create a database.yml:
test:
adapter: sqlite3
dbfile: db/rtest.db
Then I copied bikle_test.rb to...
rtest/test/functional/
I altered it a bit so it behaves like a typical Rails test:
#
# bikle_test.rb
#
require File.dirname(__FILE__) + '/../test_helper'
class BikleTest < Test::Unit::TestCase
def setup
@string10 =3D "hello"
end
def test10
assert_equal @string10, "hello"
end
end
When I run it, I see this:
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$ ls
/=09=09../=09=09bikle_test.rb
zmac11:/cd/railsdemos/rtest/test/functional oracle$ ruby b*
Loaded suite bikle_test
Started
I'm trying to run the ruby debugger against a Test::Unit::TestCase class
which is a parent of a Rails class.
I started my study with a simple script:
#
# bikle_test.rb
#
require 'test/unit'
class BikleTest < Test::Unit::TestCase
def setup
@string10 =3D "hello"
end
def test10
assert_equal @string10, "hello"
end
end
The following command line works great:
ruby -r debug bikle_test.rb
Next, I create a new rails application with this command line:
rails rtest
Then, I create a database.yml:
test:
adapter: sqlite3
dbfile: db/rtest.db
Then I copied bikle_test.rb to...
rtest/test/functional/
I altered it a bit so it behaves like a typical Rails test:
#
# bikle_test.rb
#
require File.dirname(__FILE__) + '/../test_helper'
class BikleTest < Test::Unit::TestCase
def setup
@string10 =3D "hello"
end
def test10
assert_equal @string10, "hello"
end
end
When I run it, I see this:
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$
zmac11:/cd/railsdemos/rtest/test/functional oracle$ ls
/=09=09../=09=09bikle_test.rb
zmac11:/cd/railsdemos/rtest/test/functional oracle$ ruby b*
Loaded suite bikle_test
Started