Displaying 20 results from an estimated 20000 matches similar to: "subject.should_be true"
2006 Nov 19
2
underscores, sugar, and more and more bugs
I sent this earlier under with the subject "artificial sugar causes
cancer" and I think some spam filters ate it. Here it is again:
======================================
All,
If you look at http://rubyforge.org/tracker/index.php?func=detail&aid=6760&group_id=797&atid=3149
you''ll see that Chad (the submitter) found the source of the bug.
Unfortunately, the source
2006 Nov 19
6
artificial sugar causes cancer
All,
If you look at http://rubyforge.org/tracker/index.php?func=detail&aid=6760&group_id=797&atid=3149
you''ll see that Chad (the submitter) found the source of the bug.
Unfortunately, the source of *this* bug is the *solution* to a
*previous bug* in which Rails was replacing RSpec''s method missing
with its own.
When we settled on underscores, my one reservation was
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
2006 Sep 06
1
support for arbitrary comparisons
Mike Williams contributed a patch to support arbitrary comparisons.
This is now in the trunk and will be part of the next release. So you
will now be able to do this:
result.should_be < 5
result.should_be >= 7
It also supports alternate syntax for should_be, should_match
result.should == 3
result.should =~ /regex/
Personally, I prefer should_be and should_match in these cases, as I
think
2007 Apr 11
10
DRYer controller specs
So, I''ve been following the recommendations for controller specs here:
http://blog.davidchelimsky.net/articles/2006/11/09/tutorial-rspec-stubs-and-mocks
Most notably: a single expectation per specify block; the setup block
contains only stubs; mock expectations each get their own specify
block. (I''m still using 0.8, so I haven''t gotten the describe/it
goodness yet.)
I
2006 Dec 31
2
what''s with the response.should_be_xxxx stacktrace?
If I do
get :index
response.should_be_success
I get about 20k of marshalled dumpage that starts like
#<ActionController::TestResponse:0x390443c @body=\"<html><body>You
are being <a href=\"http://test.host/carts/1\">redirected</a>.</body></html>\",
@assigns=[], @redirected_to={:action=>\"show\", :id=>1},
2007 Oct 08
17
(no subject)
Just ran svn up this morning, and got this (after running ./script/
generate rspec)
escher: ./script/spec spec/models/item_spec.rb
Finished in 8.0e-06 seconds
0 examples, 0 failures
./script/spec:4:in `run'': wrong number of arguments (3 for 1)
(ArgumentError)
from ./script/spec:4
Using rails 1.2.3, rspec trunk, on Mac OS X.4.9.
Any ideas, or is this a bug in
2007 Apr 09
10
changes in 0.8 and greater - should_
Has the should_... syntax changed? I''m getting errors when running
the following:
should_render(:index)
should_be_valid
should_not_be_valid
should_respond_to
should_be
should_render
I thought the syntax changed to something like the following:
obj.should render(:index)
but this doesn''t seem to work.
Scott
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
#
2006 Nov 21
6
Spec Naming (was: Rspec Brown Bag)
Thanks for posting your specdoc, Brandon -- they''re a great example.
On 11/21/06, Brandon Keepers <bkeepers at gmail.com> wrote:
>
> A user purchasing items
> - should create an order
> - should add to the user''s orders
> - should create line items
> - should set line item amount to the item''s price
> - should set line item amount to 0 if
2007 Aug 08
25
Problems with RESTfully generated helpers
I am using helper the RESTfully generated helper methods in my views.
My routes are nested so the helpers appear to need arguments passed to
them, but it works without arguments. Say for example I have pages and
comments. If I do page_comments_path without parameters, it works.
However, when I run the rspec test, it fails and tells me i''m missing
parameters. I tried to pass
2010 Jun 02
5
Programmatically counting RSpec tests?
If I have an object `obj` that is a SpecTask, and subsequently invoke
it, is there a way to programmatically determine the number of tests
that were successful, failed, and pending as a result of running that
SpecTask?
--
John Feminella
Principal Consultant, Distilled Brilliance
2008 Jan 31
11
ZenTest-3.9.0 incompatible with RSpec-1.1.2
Hey all,
Just a heads up that the ZenTest-3.9.0 release is not compatible with
RSpec-1.1.2. I thought I had a release ready to go, but differences
between a preview release of ZenTest that I received and the actual
release seem to have broken compatibility.
We''ll get this resolved soon, but in the mean time please hold off on
upgrading to ZenTest-3.9.0 if you''re using RSpec.
2007 Mar 14
5
What''s the new syntax for predicates?
@settings.should allow_publish_ip("127.0.0.1") fails with
undefined method `allow_publish_ip'' for #<#<Class:0x2f8fd48>:0x2f5a968>
@settings.should_allow_publish_ip("127.0.0.1") works fine
This is rspec 0.8.2.
http://rspec.rubyforge.org/documentation/expectations.html says that
matching arbitrary predicates is deprecated and to see
2008 Jun 04
8
Not running correct specs under autotest:
I know this isn''t autotest-users but I''m not sure where else to bring this up:
[["app/controllers/contents_controller.rb", Wed Jun 04 14:11:03 +0100 2008]]
[["app/controllers/contents_controller.rb", Wed Jun 04 14:11:03 +0100 2008]]
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S
script/spec -O spec/spec.opts spec/models/user_spec.rb
2007 Feb 15
4
defining context(s) dynamically
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Q. Why does code which defines a context work in the
2008 Jun 04
8
Why has the --color gone from my life?
Hi all,
Running on OSX 10.5.3, Latest Rspec trunk, Rspec rails trunk, latest
autotest gem and rails 2.1
I''ve lost my colour output in autotest.
rake spec gives colour output, but autotest gives me black and white.
It was working a little bit before, I think I upgraded to the latest
versions of everything to get all the textmate snippets talking and being
friendly to one another again
2007 Sep 08
11
changes to TextMate bundle
Hi all, I got some help from James Edward Gray II on the RSpec
TextMate bundle. For those of you who don''t know James, he runs the
Ruby Quiz and also maintains the official TM bundle.
Per a couple of patches from him and some advice that I acted on, many
of the shortcuts have changed.
The bad news is you''ll have to learn new shortcuts.
The good news is that the new shortcuts
2007 Apr 11
12
redirection doesn''t get detected well?
I''m doing a redirect in one of my controller actions and somehow I can''t
spec it, see this pastie: http://pastie.caboo.se/53120.
When following the link from a browser I''m being redirected to the right
page.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Dec 14
9
new home for the rspec website
Hi all,
We''ve moved the rspec website to http://rspec.info. We want
http://rspec.org, of course, but someone is squatting on and has yet
to respond to my email :(
The 1.1.0 docs are there. The 1.0.8 docs are still at
http://rspec.rubyforge.org for the time being. We''ll be archiving them
at the new site soon.
This new site is hosted on our shiny new sponsored slice at Engine