Displaying 20 results from an estimated 10000 matches similar to: "RSpec, REST and different formats"
2007 Jun 23
4
inverse examples? (should fail)
The new "pending" example feature reminds me of a feature I''ve been
bouncing around in my head, to aid in refactoring. Often, when I''m
changing existing behaviour, I know that certain aspects of the old
behaviour should change. Imagine changing the "it" method to perhaps
"not" or "old" or "removed"... The behaviour would be to
2007 Jan 08
2
thoughts on mocks and specs
I spent the last couple of days getting my sea legs with Rails and
RSpec. I''d been waiting til things seemed calmer before jumping in,
and I''m overall very happy with my experience so far.
My only real annoyance so far has been forgetting to call "do_post" or
"do_create" from my specify blocks. My mocks don''t get the calls they
want, and it usually
2006 Nov 25
2
Comparison between RSpec and test/unit
I''m curious, Christian Neukirchen has released test/unit[1] that seems
to mirror much of RSpec, but built on Test::Unit, so in some ways less
brittle from a Rails-integration perspective, and also allowing you to
mix the two together as appropriate.
So, has anyone made an informed comparison? I''m new enough that I
don''t really know the finer points yet. The syntax is
2007 May 31
16
Could anyone please help with rspec/nested resource behavior checking?
My problem has been listed here:
http://railsforum.com/viewtopic.php?pid=25439#p25439
Don''t think it would be required to completely re-type it here :)
Thanks!
--
-Daniel Fischer
http://danielfischer.com - Geek Blog
http://abigfisch.com - Portfolio
http://writersbeat.com - Writing Community
2006 Dec 13
4
RSpec and simply_helpful
Hi All
I''m having some problems running my view specs when using
simply_helpful. I have it semi-working via the following:
module SimplyHelpfulHelper
def self.included(base)
base.send :include, SimplyHelpful::RecordIdentificationHelper
base.send :include, SimplyHelpful::RecordTagHelper
end
end
context "The index template" do
setup do
@shift =
2007 Feb 05
1
long jumping out of code in specs
I wrote this abomination just now, and wonder if anyone else has had
experience with the pattern behind it. In short, I''m specing an
after_create hook on an ActiveRecord model, that calls a bunch of
private methods. Instead of stubbing all those private methods (which
is verboten anyway, as well as impossible because creating the object
which owns those methods is what I''m
2007 Jun 23
6
Autotest bug with rerunning passing tests?
Am I correct in remembering that autotest (with Test::Unit) would
rerun all the tests if a subset of the tests passed? If so,
shouldn''t this behaviour also be present in rspec''s autotest library?
Scott
2007 Apr 11
13
View Specs Fail with "protected method render"
I''ve got rspec and zentest installed as well as the rspec rails plugin, and
my model/controller specs all pass and work well. I can''t seem to get views
to work though - 100% of the specs fail with:
NoMethodError in ''/users/show.rhtml should render attributes in <p>''
protected method `render'' called for
2006 Oct 11
1
Retiring test2spec?
Hi all,
We''re thinking about retiring the test2spec translation tool because
it''s becoming a maintenance problem.
Is anyone using it? Would anyone miss it if it went away?
Aslak
2007 Apr 25
9
Running specs for a plugin - undefined method ''define'' for object
I''m trying to write specs for a plugin I''m developing named audit_fu, and
I''m running into a problem which I can''t get past it. I''ve got the same
specs setup in the main rails app, and everything works fine there, it''s
just running the plugin specs that I''m having a problem with. My setup is:
- edge rails
- edge rspec (in
2007 May 05
2
Translating tests
Is test2spec still around? If so, are there any special instructions for
running it against edge?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070504/bb164e29/attachment.html
2007 May 03
2
Note of praise
I don''t mean to litter the mailing list with junk, but I just wanted to say
thanks to everyone who''s been working on rspec for this release. I
particularly like your attention to natural language and thorough
documentation/examples. I''m not at the point yet where I can contribute
much to the code side of things, but if there were a donate button I would
use it.
Jeff
2006 Nov 22
3
Controller Isolation
Hi,
I have a project that I had running under rspec 0.6.x and recently upgraded
to 0.7.2.
I am trying to isolate my controllers from the database as I go through and
change all the specs to run under 0.7.2.
I am having a problem where I need to make the create! method return the
mocked object as well as raise RecordInvalid exception. Is this at all
possible?
I use the rescue statement in my
2007 Jan 30
5
errors while testing resource controller using rpec
I am testing a resource called venue in this piece of code (generated
using script/rspec_resource)
====================
context "Requesting /venues using POST" do
controller_name :venues
setup do
@mock_venue = mock(''Venue'')
@mock_venue.stub!(:save).and_return(true)
@mock_venue.stub!(:to_param).and_return(1)
Venue.stub!(:new).and_return(@mock_venue)
2007 Feb 11
1
Specing Rails Views
Hello -
I''m currently trying to write some specs for my rails views. My
views depend upon
the restful authentication plugin method logged_in? Like so,
<% if logged_in? %>
<ul id="product-admin-nav">
<dd><%= link_to "create a new product", new_product_url %></dd>
</ul>
<% end %>
However, when I have the following
2007 Apr 20
1
simply_helpful and edge
Does anyone have view specs running on edge with simply_helpful?
I tried
http://blog.methodmissing.com/2006/11/23/using-simply_helpful-with-rspec-controller-tests/but
it seems that was written for pre-9 versions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070420/0bc8d366/attachment.html
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
2007 May 03
7
before method
Would it be desirable to have before and after take a spec name as
well as :each and :all?
Scott
2007 Apr 20
1
getting controller specs to work on edge
I''m using edge spec, edge rspec_on_rails, edge rails. I just switched to
edge and ran the translator tool and I''m trying to get everything to pass
again. One of my issues is getting render back up and working for my
controller specs, here''s an example:
describe "Requesting /users using GET" do
controller_name :users
setup do
@user = mock_model(User)