Permalink
Browse files

Tests *totally* fail - 41 tests, 2 assertions, 1 failures, 40 errors ...

  • Loading branch information...
thomasn committed Jul 11, 2009
1 parent 811610f commit ec0892cb6d9a49298e6566b84c74737d018dd389
@@ -10,6 +10,4 @@ class ApplicationController < ActionController::Base
# Be sure to include AuthenticationSystem in Application Controller instead
include AuthenticatedSystem
# Pick a unique cookie name to distinguish our session data from others'
session :session_key => '_forgetmenot_session_id'
end
@@ -12,7 +12,7 @@ class CommonController < ApplicationController
helper_method :entity_class
helper_method :entity_human_name
OBJECTS_PER_PAGE = 20
OBJECTS_PER_PAGE = 20 if not defined? OBJECTS_PER_PAGE
def index
list
@@ -13,7 +13,7 @@ class AccountControllerTest < Test::Unit::TestCase
# Then, you can remove it from this and the units test.
include AuthenticatedTestHelper
fixtures :users
## CLEANUP - all fixtures preloaded ## fixtures :users
def setup
@controller = AccountController.new
@@ -1,15 +1,15 @@
# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
# License:: MIT License
# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
# License:: MIT License
require File.dirname(__FILE__) + '/../test_helper'
require 'common_controller'
# Re-raise errors caught by the controller.
class CommonController; def rescue_action(e) raise e end; end
class CommonControllerTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :groups, :group_types, :contacts, :contacts_groups, :activities, :activity_types, :activities_contacts
# FIXME all fixtures preloaded # fixtures :dynamic_attributes, :dynamic_attribute_values, :groups, :group_types, :contacts, :contacts_groups, :activities, :activity_types, :activities_contacts
def setup
@controller = CommonController.new
View
@@ -1,13 +1,13 @@
# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
# License:: MIT License
# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
# License:: MIT License
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
require File.expand_path(File.dirname(__FILE__) + '/helper_testcase')
class Test::Unit::TestCase
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test database remains unchanged so your fixtures don't have to be reloaded
@@ -20,6 +20,10 @@ class Test::Unit::TestCase
# in MySQL. Turn off transactional fixtures in this case; however, if you
# don't care one way or the other, switching from MyISAM to InnoDB tables
# is recommended.
#
# The only drawback to using transactional fixtures is when you actually
# need to test transactions. Since your test is bracketed by a transaction,
# any transactions started in your code will be automatically rolled back.
self.use_transactional_fixtures = true
# Instantiated fixtures are slow, but give you @david where otherwise you
@@ -29,5 +33,16 @@ class Test::Unit::TestCase
# then set this back to true.
self.use_instantiated_fixtures = false
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end
ENV["RAILS_ENV"] = "test"
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class ActivityTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :activities, :activities_contacts, :activity_types, :email_messages
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :activities, :activities_contacts, :activity_types, :email_messages
def test_truth
a = Activity.find(activities(:renat_and_yura_call_out).id)
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class ActivityTypeTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :activities, :activity_types
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :activities, :activity_types
def test_truth
t = ActivityType.find(activity_types(:call_out).id)
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class AddressTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :addresses
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :addresses
def test_truth
a = Address.find(addresses(:full_address).id)
@@ -8,7 +8,7 @@ class ContactMailerTest < Test::Unit::TestCase
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
CHARSET = "utf-8"
fixtures :dynamic_attributes, :dynamic_attribute_values, :email_messages, :activities, :contacts, :activities_contacts, :activity_types
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :email_messages, :activities, :contacts, :activities_contacts, :activity_types
include ActionMailer::Quoting
@@ -6,7 +6,7 @@
require 'ferret'
class ContactTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :groups, :contacts_groups, :activities, :activities_contacts, :lead_sources
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :groups, :contacts_groups, :activities, :activities_contacts, :lead_sources
def setup
# we have to do this because of unknown order of classes loading
@@ -1,11 +1,12 @@
# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
# License:: MIT License
# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
# License:: MIT License
require File.dirname(__FILE__) + '/../test_helper'
class DynamicAttributeTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values
# FIXME all fixtures loaded by test_helper # fixtures :dynamic_attributes, :dynamic_attribute_values
# Replace this with your real tests.
def test_truth
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class DynamicAttributeValueTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values
# Replace this with your real tests.
def test_truth
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class EmailMessageTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :email_messages, :activities, :activity_types, :activities_contacts, :contacts
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :email_messages, :activities, :activity_types, :activities_contacts, :contacts
def test_truth
message = email_messages(:email_to_yura_and_renat)
View
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class GroupTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :groups, :contacts, :contacts_groups, :group_types
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :groups, :contacts, :contacts_groups, :group_types
def test_truth
nexus10 = groups(:nexus10)
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class GroupTypeTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :group_types, :groups
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :group_types, :groups
def test_truth
t = GroupType.find(group_types(:prospect).id)
@@ -8,7 +8,7 @@ class ApplicationHelperTest < HelperTestCase
include ApplicationHelper
fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :groups
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :groups
def setup
super
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class LeadSourceTest < Test::Unit::TestCase
fixtures :dynamic_attributes, :dynamic_attribute_values, :lead_sources, :contacts
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :lead_sources, :contacts
def test_truth
s = LeadSource.find(lead_sources(:internet).id)
View
@@ -8,7 +8,7 @@ class UserTest < Test::Unit::TestCase
# Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead.
# Then, you can remove it from this and the functional test.
include AuthenticatedTestHelper
fixtures :dynamic_attributes, :dynamic_attribute_values, :users
## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :users
def test_should_create_user
assert_difference User, :count do

0 comments on commit ec0892c

Please sign in to comment.