I’m very happy with TDD and use it whereever possible. I came across
Rails::Test and hoped to make even better tests easier.
My problem is I haven’t been able to run my tests ever since I made
those 3 small changes to test_helper.rb
At first, I simply tried running rake test:functionals but it just
gives me errors like:
/Users/gitte/Projects/rtime/config/…/app/controllers/
billing_controller.rb:3: undefined method `layout’ for
BillingController:Class (NoMethodError)
It’s obvious to me what the error is - it’s not obvious why. Have I
missed something?
My test_helper.rb looks like this:
ENV[“RAILS_ENV”] = “test”
require File.expand_path(File.dirname(FILE) + “/…/config/
environment”)
require ‘test/rails’
require ‘test_help’
class Test::Rails::TestCase
self.use_transactional_fixtures = false
self.use_instantiated_fixtures = false
Add more helper methods to be used by all tests here…
Hi, I highly recommend using the following for testing your rails
application(s):
unit (test models)
functional (test controller and model)
integration (test across controllers and models)
I’ve very familiar witht the stock testing framework in rails - I use
it all the time for TDD
I came across Test::Rails and wanted to try it out. It has some
assertions for ajax stuff and a lot of other nifty things that I
would like to benefit from.
So I just wanted to know if anyone else had the same kind of problems
with the module as I have
Greetings,
Gitte W.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.