merb-gen ... -T creates broken unit tests
Reported by Phlip | March 30th, 2008 @ 03:49 AM | in 1.0
http://rubyforge.org/pipermail/m...
excerpt:
When I generate a controller with option -T, I get a nice "functional" test
suite (meaning a suite that mocks a controller and a web server):
class GrepperTest < Test::Unit::TestCase
def setup
@controller = Grepper.build(fake_request)
@controller.dispatch('index')
end
- Replace this with your real tests.
def test_should_be_setup
assert false
end
end
However, 'rake test' does not mind the 'assert false' there. 'rake
test:functionals' does not exist, and 'ruby test/functional/grepper_test.rb'
produces "no such file to load -- test/functional/../test_helper".
Copying one in from
'app_generators/merb_plugin/templates/test/test_helper.rb' leads to
"uninitialized constant Test"
Comments and changes to this ticket
-
Michael Klishin (antares) May 11th, 2008 @ 11:49 AM
- → Milestone changed from to 1.0
- → State changed from new to open
-
Jonas Nicklas August 17th, 2008 @ 09:17 PM
- → Tag changed from to merb-gen merb-test
Does this problem still exist with the new merb-gen?
-
Bryan Ray August 18th, 2008 @ 04:47 AM
I don't believe the -T is even a valid option any longer. Not entirely sure this ticket is valid anymore.
-
Michael Klishin (antares) August 18th, 2008 @ 07:02 AM
- → State changed from open to invalid
-

Jamie August 18th, 2008 @ 07:53 PM
I tried to run merb-gen myapp --test and that option does not work either. Using merb 0.9.3. Does this option work in a newer release somewhere? I am trying to use merb_unit_test and can not because of bug #70. Is there a work-around for this? Many thx
-
Michael Klishin (antares) August 18th, 2008 @ 08:20 PM
Merb 0.9.4 and higher has completely re-written merb-gen that is built on top of Templater.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
