Displaying 20 results from an estimated 200 matches similar to: "pontential bug in rspec_on_rails and ActiveRecord transactions"
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 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 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 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/.
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 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/.
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
2007 Apr 17
7
rspec with CI
I am a bit of a rails and rspec noob.
I am trying to use rspec in conjunction with CruiseControlrb.
When I run a cruise build having spec errors, the build does not
indicate a failure. I have tried to track down why this is the case,
and my best guess is that the spec task is kicking off the spec via a
ruby() method in rake, and that ruby method does not propagate my spec
failure back to
2004 Aug 06
2
a new directory service
> I see that with the ttl field in your approach, this goal could be
> achieved. I could set up a system which updates the info at the start of
> each program, with a ttl of the program's length. I'm only interested
> now in how this could be achieved (how could I update the directory info
> from cron, for example.)
Please dont' abuse the fields before we've
2004 Aug 06
3
a new directory service
> Again, it would be nice to be able to make this reasonably free form
> name/value pairs - one extra that has occurred to me is...
>
> icon_url - to let directoy listings jazz up their displays by permitting
> station logos (For speed reasons it's probably nicer for the directory
> server to manage teh icons locally...)
I'm trying to think of a good way to map
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 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/.
2006 May 08
10
Apache 2.2, ProxyPass and HTTPS
Hi all,
I''m currently trying to get Mongrel running my app whilst fronted by
apache 2.2 in a sub-directory via https. A bit convoluted I''ll grant
you but necessitated by existing systems.
The pertinent parts of my httpd.conf:
<VirtualHost 123.123.123.123:12345> #historic choice of random port number
DocumentRoot /var/www/admin
ServerName admin.example.com:12345
2007 Nov 14
0
rspec_on_rails, receive_and_render experiment
A recent exploration on receive_and_render to assist with some common view
spec''ing can be found at
http://www.continuousthinking.com/2007/11/14/rspec_on_rails-render_and_receive_matcher
Suggestions and feedback are welcome. Thanks,
--
Zach Dennis
http://www.continuousthinking.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Oct 22
1
installing rspec/rspec_on_rails as system wide generator (or similar)
Hi all,
What would be the best/easiest way of installing rspec as a system
wide generator so I''m not having to download it or ./script/plugin
install it every time?
Thanks,
Alastair
-----
Alastair Moore
Freelance web design, development and consultancy
t. 07983 983945
e. alastair at kozmo.co.uk
w. http://www.kozmo.co.uk
skype. alastair_kozmo
2007 Sep 08
0
rspec_on_rails - necessary to force "test" env?
Hi all
rspec_on_rails/lib/spec/rails.rb starts:
------
dir = File.dirname(__FILE__)
require ''application''
silence_warnings { RAILS_ENV = "test" }
------
That force into "test" environment is causing me trouble and I''ve
commented it out.
Why? I''m testing a plugin, and have a sort of mini rails app that I
use for the specs. The
2007 Sep 27
1
rspec_on_rails: controller method not getting called
In my rspec_on_rails controlle rspec, I have this:
require File.dirname(__FILE__) + ''/../spec_helper''
describe FooController, "with a foo" do
it "should be false" do
get ''index''
assigns[:foo].should be_false
end
end
In my controller I have this:
class FooController < ApplicationController
def index
@foo = FALSE
end
2007 Jul 26
0
rspec_on_rails magical incantations
I ran into something really puzzling today. I don''t know exactly why
it''s happening, but I thought I''d share my experiences.
I started a dummy app just to test an idea outside of the context of
my real work today. So, I quickly get things started:
* rails junk
* cd junk
* ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/
CURRENT/rspec
* ruby