Displaying 20 results from an estimated 3000 matches similar to: "Need serious help - unit testing without a database"
2006 Mar 10
2
rake fails on build server, but not in development
I''m working in a development environment of Mac OS X with MySQL, and a
production deployment environment of Redhat with Oracle XE. In the
course of setting up a new continuous build server that more closely
mimics our production environment, I got stuck on the following
strangeness on the build server (Linux, Oracle).
1. rake fails
2. rake test_units works
3. rake test_functional
2006 Aug 05
5
error with db:migrate
I''m new to ROR, and am working my way through the Agile Web Development
Book. In the test application, the authors tell me to test my database
connection by performing "rake db:migrate".
When I do, I get the error "Don''t know how to build task ''db:migrate''"
I''ve been looking around at the files, and I see a reference to a
2005 Dec 28
6
coverage does not work
Hi,
I''ve installed coverage (gem install coverage) and try to run tests with
-rcoverage option on, but following error occurs:
ruby: No such file to load -- coverage (LoadError)
I try:
ruby -rcoverage mytest.rb
1. I have rubygems in evn var RUBYOPT
2. Gem seems to be installed properly (I can read doc via gems, the files
exist in the ../gem/... dirs)
Does anyone know what is the
2006 Feb 27
1
problem with rakefile
hi,
I am having a problem with the rake test_units in my RoR application.
when i''m running it it tries to run all the files that end in *.rb (i
think) under the /unit folder in the project and it''s subfolders.
The problem is that my source control system (bitkeeper) saves an
subfolder named SCCS under each of the project folders, and in it, for
eack .rb file another file
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi,
My application spans 2 (or more) databases for some very specific
reasons... My models are working fine, even dynamically establishing
connections as needed at runtime, and spanning relationships across the
databases (which really impressed me). The problem is, I can''t seem to
force Units for these models (that use a secondary db) to load their
fixtures into and use the
2005 Dec 27
4
Migrations & Unit Testing: Possible Bug in Rails?
I recently started using migrations to create the schema of a Rails
project I am working on. The database I am using for this project is
MySQL. The initial migration creates the table and also includes a
number of execute statements (to do some things like setting primary
keys, autoincrement on some columns and other messy voodoo).
Running "rake migrate" creates the database with no
2006 Apr 02
5
PostgreSQL and unit tests
After upgrading to 1.1, I can''t run any unit tests. Apparently when I
run rake test_units, it uses a migration to set up the database.
Unfortunately when it runs the migration, it''s adding not null
constraints to every field, even though I haven''t got that set up.
I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL
8.1.0.
I''m
2006 Mar 02
2
Unit tests, salted hash login
Hello,
I am having some trouble running the unit tests for the salted has login
generator. I am a bit new to both ruby and rails so I am having a little
trouble deciphering the error message I get when running ''rake
test_units''. Up till the point where I try to run the unit tests I have
followed the quick start guide for the salted hash login generator
2006 Apr 12
2
unit testing with model inheritence
Having jotted down some models, with some inheritence I tried to run some
unit tests. After waiting for rake test_units to run I got a rake of errors
(if you''ll forgive the play on words). The errors were to do with unknown
tables in the tear down stage. The unknown tables corresponded to sub-types
where single table inheritence was used. In other words, these tables
*shouldn''t*
2006 May 05
0
Perplexing unit test issue
Because we''re now using views, I had to upgrade to mysql 5 on a
project using Rails 1.0. Updated my mysql gem accordingly (which
required upgrading xcode). Ruby 1.8.2, MacOS X (10.4.6)
Worked fine several times (even before updating the mysql gem, then
suddenly it just balked and stopped working, giving the spew below.
Have also dropped (and recreated) both the test and
2004 Sep 10
5
1.0 source candidate
I rethought it and it seemed like a bad idea to post
a big file, so you can get it here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/flac/junk/flac-1.0-src-candidate.tar.bz2
Josh
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
2007 Apr 19
5
Best practice thoughts: Model helpers, mocks
Hello! I''m pretty new to unit testing, and have only been using RSpec
for a few weeks. I found that for my controller specs, my setup
methods were getting very long building mocks/stubs for all the model
objects I needed to work with.
I''ve started creating helpers like the following for each of my
models. The "min_" methods are short for "minimum", and
2005 Dec 16
4
Validation with Aggregation
ActiveRecord supports composed_of for value objects which is
fantastic but one thing that it doesn''t seem to support (or at least
I am unable to find any documentation for) validation of the value
objects.
For example, given the following:
class Message < ActiveRecord::Base
composed_of :sender, :class_name => ''EmailAddress''
composed_of :recipient,
2006 Jun 02
3
Wierdness with rake test_units and schema.rb
I have just migrated to use Rail 1.1 from 1.0.
In the progress of fixing and cleaning up the unit tests. I found the
following problem. I am not sure if this is a bug or it is my
environment.
When I run "rake test_units, some of the index in association tables is
not created, this leads to failures for some unit test cases.
Thinking that may be because I didn''t setup the
2006 Mar 01
5
validations without AR - going crazy trying to find link
Hi,
in the past few months someone posted an entry on their blog about
how to do validations in non-AR classes and I cant find it any more.
Anyone have a link?
Thanks,
Trevor
--
Trevor Squires
http://somethinglearned.com
2005 Oct 20
5
Unit Test Error: `load_specification': undefined method `parse' for Time:Class
All,
I''ve come across a confusing problem when attempting to run unit tests
for an application on OSX (works on Windows).
I''m receiving the following error:
`load_specification'': undefined method `parse'' for Time:Class (NoMethodError)
This is also confusing because I can''t figure out how the error
appeared. When I revert back to previous revisions,
2014 Feb 21
6
[LLVMdev] make check issue with llvm-cov
rkotler at mipsswbrd006-le:~/caviumllvm/build/test$ make
Making LLVM 'lit.site.cfg' file...
Making LLVM unittest 'lit.site.cfg' file...
( ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -s 8192 ; \
/usr/bin/python /home/rkotler/workspace/llvm/utils/lit/lit.py -s
-v . )
XPASS: LLVM :: tools/llvm-cov/llvm-cov.test (8916 of 9784)
******************** TEST
2008 Aug 24
1
avoiding exceptions in views
when rendering a view, if the object being rendered doesn''t respond to a
method it raises an error message.
For example, I have an Employee class and each employee has many Tasks.
So I may call:
<%= employee.tasks.first.task_name %>
If, for some reason an employee has 0 tasks associated with it, the
above template method would raise an exception.
Is it efficient to loop through the
2006 Dec 14
3
Stubbing constructiors
This works:
class X
def X.initialize( stuff )
end
end
X.initialize("bla")
However stubbing it doesn,t:
require ''test/unit''
require ''stubba''
class X
def X.initialize( stuff )
end
end
class XTest < Test::Unit::TestCase
def test_
X.stubs(:initialize).with("bla")
2008 Jun 18
1
Ruby on Rails 2.1 Unit Testing
Hi,
Just introduced few more chapters in my Ruby on Rails 2.1 tutorial. Most
interesting one is Unit Testing of RoR Applications.
Just go through it and send me your comments.
http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-unit-testing.htm
Thanks.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are