works but need some cleanup

This commit is contained in:
Wojciech Todryk 2011-06-24 23:48:08 +02:00
parent 0ec83db287
commit e40a859b7d
752 changed files with 4866 additions and 27923 deletions

View file

@ -1,5 +0,0 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
first_expression:
id: 1
another_expression:
id: 2

View file

@ -1,5 +0,0 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
first_filter:
id: 1
another_filter:
id: 2

View file

@ -1,5 +0,0 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
first_user:
id: 1
another_user:
id: 2

View file

@ -0,0 +1,9 @@
require 'test_helper'
require 'rails/performance_test_help'
# Profiling results for each test method are written to tmp/performance.
class BrowsingTest < ActionDispatch::PerformanceTest
def test_homepage
get '/'
end
end

18
test/test_helper.rb Normal file → Executable file
View file

@ -1,13 +1,13 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class Test::Unit::TestCase
# Turn off transactional fixtures if you're working with MyISAM tables in MySQL
self.use_transactional_fixtures = true
# Instantiated fixtures are slow, but give you @david where you otherwise would need people(:david)
self.use_instantiated_fixtures = false
class ActiveSupport::TestCase
# 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
end

View file

@ -1,14 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
class ExpressionTest < Test::Unit::TestCase
fixtures :expressions
def setup
@expression = Expression.find(1)
end
# Replace this with your real tests.
def test_truth
assert_kind_of Expression, @expression
end
end

View file

@ -1,14 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
class FilterTest < Test::Unit::TestCase
fixtures :filters
def setup
@filter = Filter.find(1)
end
# Replace this with your real tests.
def test_truth
assert_kind_of Filter, @filter
end
end

View file

@ -1,14 +0,0 @@
require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
fixtures :users
def setup
@user = User.find(1)
end
# Replace this with your real tests.
def test_truth
assert_kind_of User, @user
end
end