Displaying 12 results from an estimated 12 matches for "be_empti".
Did you mean:
be_empty
2008 Jun 07
3
Match render :nothing
Hello guys,
Is there any way to match a render :nothing?
I coudn''t find any way to do this so i''ve just changed my controllers
to do a "head :ok", but it would be nice to know if there is any other
way :)
--
Maur?cio Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
Jo?o Pessoa, PB, +55 83 8867-7208
2007 Apr 08
2
typos in a tutorial page
This page has some typos in the forth grey box
http://rspec.rubyforge.org/tutorials/stack_04.html
"should_equal" should be "should =="
and
"should_not_be_empty" should be "should_not be_empty"
this causes some spec to fail
By the way, this is my first mail to the list, so Hi everybody !!
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do
foo.should (be_nil || be_empty)
in rspec.
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2007 Nov 01
3
autotest debugger?
Hi,
I keep facing problems with autotest, and I don''t know what''s happening
in the background, is there anyway to know what''s happening while
testing?
Example:
@user = User.new
@user.email = "testcom"
@user.errors.on(:email).should_not be_empty
...throws error failure
- You have a nil object when you didn''t expect it!
- You might have expected an
2008 Jan 11
13
Role of stories vs specs, revisited
A couple months ago I asked how stories and specs might impact each
other. [1] If you look at Dan North''s example of what''s in a story
[2], and you imagine using the spec framework to drive the design, you
can probably imagine a significant bit of overlap in the two. Is that
a bad thing? I''m not sure. It has made me a bit uncomfortable
though, and I''ve
2007 Sep 07
12
Preconditions
Sorry, lots of questions these days.
Is there a normal approach for preconditions? In JUnit, I might put a few
assertions in the setUp() just to make sure that the test ''data'' I''ve
created meets expectations before going to test it.
So, for instance, I''ve got an object that is audited using acts_as_audited
and I''d like to test the XML that results
2009 Apr 16
6
Cucumber - step negating another expecting step
On 16 Apr 2009, at 11:22, Joaquin Rivera Padron wrote:
> at the moment I do it this way, hiding the complexity out of the
> steps:
>
> Then /^I should see the people search form$/ do
> people_search_form_exists
> end
>
> Then /^I should not see the people search form$/ do
> people_search_form_exists "not"
> end
>
> and then the method:
>
>
2007 Apr 04
11
ANN: RSpec 0.9.0 beta-1 available for download.
We''d like to get some feedback on RSpec 0.9 before we start pushing
out releases via Rubyforge''s gem server and update the website. We
have therefore made the first beta of 0.9 available - both prepackaged
and tagged in subversion (see below).
RSpec 0.9 introduces a new API for expectations, which essentially
means that your underscores go away (there has been other discussions
2008 Mar 17
4
RSpec''ing model association callbacks
Hi all,
i''m learning rspec and i must admit i really love it.
But at the time i started learning it, i already
developed my models classes and their callbacks.
Now i''m trying to get a 100% coverage of my code but i
cannot reach it because i do not understand how to
spec my callbacks.
Look at this for example:
----------------- User Model
class User < ActiveRecord::Base
2007 Aug 01
3
Test Rendering nothing in Rails
Hi
In a controller I have method that is accessed via an AJAX call and
will conditionally do:
render :nothing => true
to test the condition hitting this line I was hoping to do something
like:
response.should render_template(:nothing)
How should I test this behaviour?
Cheers
Shane
2007 Feb 04
10
Spec''ing ActionMailer
Good morning (Pacific Time). I have a controller action that, as a
side-effect, sends an email to an administrator. I want it to do
something like this:
specify "when someone successfully signs up, an email should be sent
to the administrator with the person''s contact page" do
post :signup, {...lots o'' params}
response should_be success
#
2008 Jun 11
3
help with test design
I''m having trouble figuring out how to drive the design of a class.
I''m hoping I can get a hint or two from the more experienced BDDers on
this list.
I''m writing an adapter class that sits between a 3rd party library and
my business logic. I would like to extract some information from
objects available from the 3rd party lib and covert them into ruby
objects.