Displaying 20 results from an estimated 7000 matches similar to: "rake test without 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
2007 Feb 13
3
"should.be_in [values]" and "each_should_satisfy"
Hi!
I just started using RSpec and have some question that I couldn''t find
answers to.
If I have a result that can have two valid values, is there a better way
of writing
the following assertion?
[value1,value2].should_include actual
Is there a more elegant way of performing should_satisfy on a
collection, for
example I currently use something like collection.each {|x|
2006 May 08
4
rake db:migrate
Would it make sense for rake db:migrate to support creating databases if
it is not found, with blessing from user to prevent typos, or as an
additional command line switch.
Or am I just being too lazy?
--
Posted via http://www.ruby-forum.com/.
2007 Jul 19
1
stopping on first failure
Hi!
Is there an option that I could provide to the spec runner that would
make it stop after it
encounters the first spec that fails?
Esad
2007 Feb 20
1
having should_receive expectation for things that happen in setup
Hi!
The following example doesn''t work for me: http://pastie.caboo.se/41732
However, if the call to msg() happens in the specify block after the
expecation and not in the setup, it will pass.
Why is this? I thought the setup method was there to actually
''construct'' the context and the specifications are some kind of
"postconditions" that only need to be
2006 Mar 01
5
single transaction migrations
Hi!
It seems that migration doesn''t use single transcation to execute the
needed migrations for the database upgrade, so if I have database at
version 5, and I wrote some migrations 6..10, and error occurs while
executing migration 7, the database stays in state 6?
I also think that migration taks could use some more verbosity, for
example if migration fails, there''s no
2007 Apr 04
1
pontential bug in rspec_on_rails and ActiveRecord transactions
Hello rspec-users,
I''ve encountered a strange bug in rspec, but it may be me who is wrong.
I''m running latest version from the trunk (r1678) of both rspec and
rspec_on_rails.
Please consider the following model:
class Url < ActiveRecord::Base
def after_save
Contact.create!(:primary_email => ''user at example.com'')
raise
2006 Feb 17
1
foreign key support in mysql adapter
Hi!
I''m using Migration to define my database schema and these "ALTER TABLE
t ADD FOREIGN KEY..." look really ugly - that''s why I wanted to ask it
would be possible to simply add add_foreign_key method to ActiveRecord?
Are there any reasons this isn''t yet implemented?
Greetings,
Esad
--
Posted via http://www.ruby-forum.com/.
2005 Dec 30
1
Need serious help - unit testing without a database
I''ve created a model, let''s just call it Person
class Person
attr_accessor :first_name, :lastname
def full_name
@first_name + " " + @last_name
end
end
I''m using this in my Rails application. My Rails application does not
use a database of any kind, and this model is obviously not a subclass
of ActiveRecord::Base. I can''t unit test this
2006 Mar 07
1
decorators for models?
Hi!
I''m thinking of implementing datagrid like functionality for showing
data (models) in grids so that I don''t have to re-invent the
view/controller for each table I need. There are number of parameters
that need to be customizable: column titles, row style depending on the
data (i.e. showing all rows with balance<0 in red), is column sortable,
sort-algorithm etc.
To
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 Jan 23
0
continuous integration - how do you do it?
Hi All,
In the absence of any clear picture about whether damagecontrol is a
practical option for continuous integration, I set up the following
scripts on my server to run the rails functional and unit tests each day
and mail me the results:
::::::::::::::
run_functional_tests.sh
::::::::::::::
#!/bin/bash
cd /var/www/ruby/srjoseph/prometheus
rake test_functional &>
2007 Apr 13
1
File.should be_exist?
Hi!
Is there a nicer way of writing
File.should be_exist(''filename'')?
File.should exist(''foo'') throws NoMethodError in ''specification''
undefined method `exist'' for #<#<Class:0x3ec1c30>:0x3ebc308>
(I''m using rspec from the trunk)
Esad
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 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 Dec 16
2
RSpec with Rails but without any database
Hi!
Any hints on how I can get RSpec/Rails to work without any database?
I''ve got the Test::Unit tests working by adding a file in lib/tasks
which clears the prerequisites of the rake targets "test:units",
"test:functionals" and so on. What''s the shortest way to make RSpec work
without any database?
bye,
Tobias
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 Mar 01
0
rake test_unit from controller
I was just thinking it might be nice to run rake test_units from a
controller and put the outputs into the browser. I like the original
green or red bar.
I figure someone must have done this but a quick search turned up
nothing.
Any ideas?
Gareth
--
Posted via http://www.ruby-forum.com/.
2006 May 11
1
rendering in after_filter
Hi!
Is it possible to render the action within the after_filter method, or
is the rendering performed before?
I have something like this:
class FooController
after_filter :send
def a
@content=...
end
def b
@content=..
end
protected
def send
send_data(@content,...)
end
end
However, when calling the action a or b, the @content doesn''t get sent,
but instead
2006 Mar 21
1
including templates/views in plugins
Hi!
I''m writing a datagrid plugin and would like to render the datagrid
using a .rhtml template. However, I''d like to avoid placing this
template in app/views/shared, but it should reside somewhere within
vendor/plugins/datagrid/...
Any ideas?
--
Posted via http://www.ruby-forum.com/.