Can you be more specific? Where have you seen such references? What
did they say? Is this even an rspec question? If it's about Rails
models, try the rails list. But if you do, be more specific :)
On 9/16/07, David James [EMAIL PROTECTED] wrote:
I've seen reference to an 'add' method, as in
On 16 Sep 2007, at 06:43, Pat Maddox wrote:
You can't assign mock objects to associations.
Actually I haven't had any trouble with e.g.
@company = Company.new :name = 'BigCo'
@mock_employee = mock_model(Employee, :name = 'Pat', :[]= =
true, :save = true)
@company.employees
When you use spec:doc, it does a dry-run, in which case the blocks are
never executed, in which case you get this message for every block
relying on auto-generated names:
describe 5 do
it { 5.should == 5}
end
If you mean to use the specdoc format (i.e. it really runs everything
and you get the
This happens if you have it blocks with no name. RSpec tries to
generate names based on the code inside, but with dry run it isn't
executed, so it can't.
But maybe you don't have empty it blocks? I'm just guessing here...
Aslak
On 9/16/07, Christopher D. Pratt [EMAIL PROTECTED] wrote:
I went
I've been working on a Rails project with one other developer; he was
using Test::Unit, and I was using RSpec. That works OK for a while, but
obviously it starts causing pain when you have to check in two places to
see if a piece of code is properly tested/spec'd, you can't use TextMate
By all means, they should not ever try anything new. The people of
Earth should not have ever adopted the use of the electric light bulb
or the radio or the automobile or the airplane or the microwave or the
telephone or ... the Internet. No, don't adopt anything new, just
stick to the old ways of
I wish I was more specific, indeed. :)
While scouring the Web for examples of mocking ActiveRecord associations
(see other thread), I saw the add method -- but couldn't figure out what it
did. That made me wonder if it was perhaps some special construct in RSpec
(perhaps for helping with
On 9/16/2007 10:18 AM, Kevin Williams wrote:
By all means, they should not ever try anything new. The people of
Earth should not have ever adopted the use of the electric light bulb
or the radio or the automobile or the airplane or the microwave or the
telephone or ... the Internet. No, don't
I honestly didn't understand what I was testing for when I was using TDD.
I can't imagine starting a project without using rspec.
Rspec reads much clearly and keeps me in scope.
The same reason I can't imagine starting a project without ruby.
Freedom is Slavery!
On 9/16/07, David James [EMAIL
You may have lost the fight, but you didn't lose the war.
On 9/16/07, Andrew WC Brown [EMAIL PROTECTED] wrote:
I honestly didn't understand what I was testing for when I was using TDD.
I can't imagine starting a project without using rspec.
Rspec reads much clearly and keeps me in scope.
The
On Sep 16, 2007, at 1:20 AM, David James wrote:
I'm currently try to push my limits a little bit with some of my
unit testing -- trying to avoid saving ActiveRecord objects to the
database and take advantage of mock/stub objects.
How far should I expect to get in this direction? From
On Sep 16, 2007, at 9:38 AM, Jay Levitt wrote:
I've been working on a Rails project with one other developer; he was
using Test::Unit, and I was using RSpec. That works OK for a
while, but
obviously it starts causing pain when you have to check in two
places to
see if a piece of code
While the spirit of BDD is to spec first and code second, many of us
have legacy code. Worse, some of us have legacy code without very
good coverage. Recognizing that *I* have such code, I created a
script that grinds through your .rb files and creates placeholder
specs for each public
I'm going through Peepcode's Rspec Basics for an overview.
He's just doing a simple spec:
class PeepCode
end
describe PeepCode do
it should be awsome do
end
end
So running spec spec/simple_spec.rb should produce according to his screen
cast:
1 example, 0 failures, 1 not implemented
but I
On 9/16/07, Andrew WC Brown [EMAIL PROTECTED] wrote:
I'm going through Peepcode's Rspec Basics for an overview.
He's just doing a simple spec:
class PeepCode
end
describe PeepCode do
it should be awsome do
end
end
So running spec spec/simple_spec.rb should produce according to
On 9/16/07, s.ross [EMAIL PROTECTED] wrote:
While the spirit of BDD is to spec first and code second, many of us
have legacy code. Worse, some of us have legacy code without very
good coverage. Recognizing that *I* have such code, I created a
script that grinds through your .rb files and
On 9/16/07, s.ross [EMAIL PROTECTED] wrote:
While the spirit of BDD is to spec first and code second, many of us
have legacy code. Worse, some of us have legacy code without very
good coverage. Recognizing that *I* have such code, I created a
script that grinds through your .rb files and
Oh, he removed the block.
describe PeepCode do
it should be awsome do
end
end
describe PeepCode do
it should be awsome
end
I'm still haven't solved --format with specing.
On 9/16/07, David Chelimsky [EMAIL PROTECTED] wrote:
On 9/16/07, Andrew WC Brown [EMAIL PROTECTED] wrote:
I'm
Both Solved,
User Error =P
On 9/16/07, Andrew WC Brown [EMAIL PROTECTED] wrote:
Oh, he removed the block.
describe PeepCode do
it should be awsome do
end
end
describe PeepCode do
it should be awsome
end
I'm still haven't solved --format with specing.
On 9/16/07, David
On 9/16/07, Scott Taylor [EMAIL PROTECTED] wrote:
On Sep 16, 2007, at 3:04 PM, David Chelimsky wrote:
On 9/16/07, s.ross [EMAIL PROTECTED] wrote:
While the spirit of BDD is to spec first and code second, many of us
have legacy code. Worse, some of us have legacy code without very
good
As with all development tools, caveat programmer. The art is in
recognizing the behaviors and not just exercising the methods
meaninglessly. I personally believe that having the method tests in
spec form allows me to think about what the methods are *doing* and
then write the real behavior
I'm going through PeepCode RSpec Basics and he gets a beautiful rspec
results page in html when he presses a hotkey in TextMate.
I would guess it's along the lines of Apple + R but I don't get the same
results and I'm using the same bundle.
___
On Sep 16, 2007, at 9:43 PM, Andrew WC Brown wrote:
I'm going through PeepCode RSpec Basics and he gets a beautiful
rspec results page in html when he presses a hotkey in TextMate.
I would guess it's along the lines of Apple + R but I don't get the
same results and I'm using the same
Thanks for all the responses. Unfortunately, I apparently just like being
difficult.
Tom: I installed the new version of rspec on a fresh app, so the first run
of script/generate rspec was from the trunk version ... good idea though,
because it sounds like something I would have done
-
Yes that is nice because you know what files aren't really being used. That is
asiming you tested everything that is being used!
Sent via BlackBerry from T-Mobile
-Original Message-
From: Scott Taylor [EMAIL PROTECTED]
Date: Sun, 16 Sep 2007 15:45:34
To:rspec-users
25 matches
Mail list logo