Displaying 20 results from an estimated 9000 matches similar to: "stopping on first failure"
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|
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
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 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
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 Feb 01
3
Structure for library code specs
Hi
Are there any plans to add a structure for library specs, eg
RAILS_ROOT/spec/lib ? There''s no equivalent spec:libraries task, and
any spec lines for library code are lost from the rake stats output.
Ashley
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 Oct 24
2
1 should be 2. huh?
There''s another quirk I wanted to bring up. It''s about the failure
message with should_equal and should_be.
x.should_equal 2
a.should_not_be nil
When they fail they yield messages like:
1 should equal 2
nil should not be nil
When I''m caught off guard, which can be often, these messages confuse
me. 1 should equal 2? No it shouldn''t. nil should not be
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
2007 Jun 29
3
fixtures :all
Does rspec not understand "fixtures :all" ? If so, has it been
requested? If not, can I request it?
If you need a patch I can surely submit one. ;)
Zach
2007 Sep 22
1
Cannot build trunk
I apologize if this is a very dumb newbie issue, but I really want to
experiment with the new "Story Runner" functionality in rspec and I''m having
trouble using the trunk.
I''ve tried in both windows and linux environments and have different
problems on each.
On linux, I execute svn co svn://rubyforge.org/var/svn/rspec/trunk to check
out the trunk. This completes
2007 May 23
2
rspec mocha and controller specs without integrated_views
The ability to choose a mocking framework is great as I prefer mocha, but I
am have problems.
On my controller specs, I am forced to ''integrate_views'' as the following
code below shows you, the mocking of views is rspec specific. See stub!
versus mocha''s stub
unless block_given?
unless integrate_views?
2007 Mar 01
1
Problems with RC1 & Rails Controllers
I''m now using the 0.8.0 RC1 gem and have the same version of rspec
and rspec_on_rails checked out into my vendor/plugins directory.
I''m having a problems with controllers... I''ve generated a controller
using the ./script/generate rspec_controller MyController. When I
try to run the rake spec:controller task I get the following:
euclid% rake spec:controllers
(in
2007 Jul 17
3
two acts_as_ferret questions!
hi, guys:
two acts_as_ferret questions!
1, ruby script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
sh: svn: command not found
i can not install acts_as_ferret to my Rails project.
what''s wrong? i''m useing rhel 4!
2, i downloaded the acts_as_ferret-0.4.0.tgz at
http://rubyforge.org/frs/?group_id=2916&release_id=10617
and uploaded to
2007 May 10
12
shared descriptions -- a couple of issues
Hello All,
I''ve just upgraded to rspec/rspec_on_rails 0.9.3 and am very excited
about shared descriptions. They couldn''t have come at a better time: I
just finished refactoring some REST controllers so that the bulk of
the actions are inherited from a superclass. Now I can write the
specs once, too. :)
I''ve hit a couple of snags, though. I thought I''d
2012 Feb 18
5
Folder name migration when moving from 2.0.x to 2.1.x?
Today I encountered this after upgrading:
Feb 18 18:15:40 postamt dovecot: imap(lehnertr): Panic: LIST: Mailbox name not UTF-8: INBOX.Entw?rfe
Feb 18 18:15:40 postamt dovecot: imap(lehnertr): Error: Raw backtrace:
/usr/local/lib/dovecot/libdovecot.so.0(+0x4104a) [0xb75cc04a] ->
/usr/local/lib/dovecot/libdovecot.so.0(+0x410bb) [0xb75cc0bb] ->
/usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0)