escribe PeepCode, "awesome" do
it "should call the totally_rad method" do
peep = PeepCode.new
peep.should_receive(:totally_rad).and_return(...whatever...)
peep.awesome
end
it "should return the string 'righteous'" do
PeepCode.new.awesome.should == &
Hey Tim,
I didn't see the first post.
If you've namespaced the controller, you'll need to make that change
in the spec.
My assumption is that
SponsorsController became Admin::SponsorsController
So you'll need to make sure that this is reflected in your spec.
-Jim
On Apr 8, 2009, at 5:18 PM,
On Feb 19, 2009, at 3:54 PM, Martin wrote:
Hi,
I'm trying to test my views using rspec. I want to test my edit- and
new-view also for the case an error occurs (something like "title
can't be blank" and so on).
Can someone point me please to an example where I can see how to
mock my mode
On Feb 18, 2009, at 7:39 PM, Fernando Perez wrote:
Yi Wen wrote:
Hello,
according to this post:
http://blog.davidchelimsky.net/2009/1/13/rspec-1-1-12-is-released
I should be able to write:
describe User do
it {should valdate_presence_of(:login)}
end
What's the point in testing validates_
On Jan 19, 2009, at 2:11 PM, James Byrne wrote:
Of the several ways available to test for this, what would be the
preferred way to see if the following is present in an html document
WITHOUT actually following the link?
response.should have_tag('a[href=?]','/users/new')
I tried this:
res
On Dec 4, 2008, at 1:34 PM, Andrew Premdas wrote:
This is of topic but I have a feeling I might get some useful advice
here - hope you don't mind
I've created a rails project that I want to use as a basis for other
rails project. I was wondering if anyone had any tips on workflow
for doi
On Dec 2, 2008, at 10:42 AM, aslak hellesoy wrote:
On Tue, Dec 2, 2008 at 4:25 PM, Stephen Veit <[EMAIL PROTECTED]>
wrote:
I added cucumber to my rails project using the following commands:
git submodule add git://github.com/aslakhellesoy/cucumber.git \
vendor/plugins/cucumber
ruby script/gen
On Nov 4, 2008, at 3:01 PM, Ben Mabey wrote:
Fernando Perez wrote:
As a starter, can someone tell me if the specs defined in
restful_authentication are clever? Can I learn from them?
Please don't look at restful_auth as an example on how to use rspec
examples and/or the story runner. T
On Oct 16, 2008, at 7:59 AM, Dave Phiri wrote:
David Chelimsky wrote:
On Thu, Sep 4, 2008 at 8:42 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
I want to spec that a controller uses a particular layout
how do I do that?
Depends on what else is going on, but this is the simplest situation:
co
On Aug 24, 2008, at 10:39 AM, Muhammad Ichsan wrote:
Dear All,
I'm a new member here. I've been using RSpec since my first Rails
project. I'm proud that I've deliver the most bugs free app in my
office (In my country, spec'ing even autotesting is not common).
Thanks to Ruby community that make
On Aug 6, 2008, at 12:04 AM, David Chelimsky wrote:
On Sat, Aug 2, 2008 at 3:43 PM, Luis Lavena <[EMAIL PROTECTED]>
wrote:
On Sat, Aug 2, 2008 at 9:04 PM, Mark Wilden <[EMAIL PROTECTED]>
wrote:
spec_server is one of the hidden gems of the RSpec world. It's not
completely a slam-dunk to use,
On Jun 28, 2008, at 5:32 AM, David Chelimsky wrote:
I'm beginning to regret the validity example, because it is somewhat
structural as well. The behaviour is not whether it's valid or not,
but rather whether you can save it or not. So scratch the example I
gave earlier and think about this:
On Jun 27, 2008, at 10:07 PM, David Chelimsky wrote:
An association does not want you to know that it's an association.
It wants you to think of it as any other attribute. Why do you care
what it IS? Focus on what it DOES.
Good point. Being a newbie I sometimes find myself where I *think* I'
http://www.lindsaar.net/2008/6/24/tip-24-being-clever-in-specs-is-for-dummies
That post is fantastic. Thanks!
Couldn't agree more with that post... For instance,
restful_authentication now comes with specs, but, ehrm... See for
yourself: http://pastie.org/222670
haha. I have no idea wha
14 matches
Mail list logo