Sha256: aeaf9f62263069c2eca3244b43e5849cf9a29edcb4114cce2a2964f52747dfc7

Contents?: true

Size: 823 Bytes

Versions: 6

Compression:

Stored size: 823 Bytes

Contents

##
# Test::Rails::TestCase is an abstract test case for Test::Rails test cases.
#--
# Eventually this will hold the fixture setup stuff.

class Test::Rails::TestCase < Test::Unit::TestCase

  undef_method :default_test

  # Set defaults because Rails has poor ones (and these don't inherit properly)
  self.use_transactional_fixtures = true
  self.use_instantiated_fixtures = false

end

module Test::Unit::Assertions
  ##
  # TODO: should this go in this file?
  # Asserts that model indeed has a given callback
  #
  # assert_callback(Model, :before_save, :something)

  def assert_callback(model_class, callback, method_name, message=nil)
    vars = model_class.instance_variable_get(:@inheritable_attributes)
    assert vars.has_key?(callback), message
    assert_include vars[callback], method_name, message
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
omghax-test_rails-1.0.0 lib/test/rails/test_case.rb
ryanbriones-ZenTest-3.11.1 lib/test/rails/test_case.rb
ZenTest-3.9.3 lib/test/rails/test_case.rb
ZenTest-3.10.0 lib/test/rails/test_case.rb
ZenTest-3.11.0 lib/test/rails/test_case.rb
ZenTest-3.11.1 lib/test/rails/test_case.rb