Displaying 20 results from an estimated 30000 matches similar to: "rake test_unit from controller"
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 Feb 26
0
using rake test_unit on Bitkeeper repository
Hi,
I''m writing an RoR application on a source-control system Bitkeeper.
for each source file yyy.zzz in Directory XXX it saves a file called
x.yyy.zzz in subdirectory XXX/SCCS.
when I try to run ''rake test_unit'' it also tries to execute the files of
the bitkeeper as unit tests, which of course fails.
Is there a way to tell rake to skip all the files in the SCCS
2006 Feb 02
4
rake test_units slow on startup
Hi
Running ''rake test_units'' using the simple example from the intro video is
very slow on my computer. While the tests claim to execute in 0.17 secs,
the startup time ad 5.3 seconds to the overall job.
On the video, these tasks ran in about 1 second. (Maybe David was doing
the tests on a dual proc mac or did some video editing, who knows.)
But, I don''t think it should
2006 Mar 29
0
rake default(?)/test_unit magic
Hi list!
I''m trying to add a rake task or a command line switch to the existing
task to run Tk unit test runner instead of console one. Yet I couldn''t
figure out where this magic is happening, i.e. where console runner is
initialized and run?
And yes, wouldn''t something like rake task "all_test" be more
appropriate then default?
--
Posted via
2006 Jan 02
3
rake test_units not loading any fixtures
Hello All,
If I run my unit tests individually using Ruby, they all work correctly.
However, if I try to run them using "rake test_units", I get a bunch of
error messages.
The error messages appear to be caused by rake not loading any of the
fixtures into the test database.
I am using PostgreSQL on Windows.
Does anyone have any suggestions?
Many thanks,
Bruce.
--
Posted via
2006 Jan 07
8
exposing id''d
I have been working on a small app that started with some scaffolding.
Some of my actions still have the structure where the id''s of things are
passed on the url for gets.
Whats the best way to avoid the security problems that this creates?
I am sure that there are many pages written on this topic but I guess I
have been searching for the wrong things.
Thanks
Gareth
--
Posted via
2006 May 07
1
rake test without database
Hi!
Is it possible to run unit tests when no database is configured?
Rails recipes mentions putting following piece of code in a file within
lib/tasks/
[:test_units,:test_functional,:recent].each do |name|
Rake::Task.lookup(name).prerequisites.clear
end
However this seem to be out-of-date, as task lookup in rake according to
RDoc is now done using Rake:Task[name]. But after I updated the
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 Jan 04
7
variables in layouts
I have a layout that provides the basic outline of each page in my app.
It has a title, footer and a navigation bar.
In the title I want to put the name of the current user that is logged
in.
I could do something like @session[:username] but I would rather
encapsulate that into a single variable so that I can change the key in
the session map if I want without having to goto each page that
2006 Apr 02
1
not null constraints added when running rake - is this a "feature?"
After upgrading to Rails 1.1, a lot of my unit tests broke. Turns out
when I run rake test_units and it migrates the test database, it adds
a not null constraint to every column. I don''t have this specified in
my migration, and apparently it works fine with rake migrate if I do
''rake migrate RAILS_ENV=test'', the not null constraints aren''t set.
So why when I
2006 Aug 08
2
Testing Inconsistencies - ruby works rake fails
I''m getting some very weird results when testing my system. If I run my
unit tests using => ruby \test\unit\<filename.rb> each of the tests
pass. If I run => rake test_units I get several failures, and they all
have to deal with the same issue. For instance I''m getting =>
ActiveRecord::StatementInvalid: RuntimeError: ERROR C42P01
Mrelation
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
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 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
2006 Jun 10
2
readline problems
I get the following error:
rake test_units --trace
** Invoke test_units (first_time)
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke db:test:clone (first_time)
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Execute db:test:clone
**
2010 Nov 08
0
Rails3: "rake test" task does not run tests.
Hello all,
I have a spiffy new rails3 app for which I can run tests individually,
but not via rake. Behold!
> $ ruby -Itest test/unit/test_user.rb
> Loaded suite test/unit/test_user
> Started
> .
> Finished in 0.466033 seconds.
>
> 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
>
> Test run options: --seed 21789
and
> $ rake test:units --trace
> (in
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 28
10
Salted hash login, postgresql, unit tests
Hello,
I have tried to install the salted hash login generator by following the
quick start guide at:
http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart.
Everything seems to work fine until I try to run the unit tests by doing
''rake test_units'', then I get the following error message:
<error-message>
[brasse@keso login-test]$ rake test_units
(in
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 Jul 14
1
receiving nil exception in rake tests
I''ve been doing some really simple rails testing, going along with
standard "red light... green light..." back-and-forth-ing.
All of a sudden, rake was reporting that there were "Test failures" but
not showing any stack trace. I went into
/usr/local/ruby/.../rails/lib/tasks/testing.rake
and looked at the source that ran the tests.
I found these lines:
---
desc