On Nov 21, 2007, at 11:14 PM, Ben Mabey wrote:
> I like what Scott suggested.
>
> it_should_behave_like "a foo", :with => { ... }
>
> Might read a little better. But I like the idea of it just taking
> a hash.
>
The obvious problem with this approach is that it will crowd the
namespace (dec
I like what Scott suggested.
it_should_behave_like "a foo", :with => { ... }
Might read a little better. But I like the idea of it just taking a hash.
-Ben
Nathan Sutton wrote:
> Anyone else have any opinions on this? I'd like to get some more input.
>
> Thanks,
>
> Nathan Sutton
> [EMAIL PR
Anyone else have any opinions on this? I'd like to get some more input.
Thanks,
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge revision 2909
rails edge revision 8175
On Nov 21, 2007, at 4:58 PM, Scott Taylor wrote:
>
> On Nov 21, 2007, at 5:42 PM, Nathan Sutton
Scott Taylor wrote:
>> You were absolutely right. My gem configuration is kind of mangled
>> (Leopard thing) and ZenTest would only update to 3.5.0 so I thought it
>> was the most recent version.
>
> Strange. Are you using the rubygems which comes with leopard? I
> wonder if it's a bug...
I am
On Nov 21, 2007, at 5:42 PM, Nathan Sutton wrote:
> Not even sure, what are your thoughts?
>
> Nathan Sutton
> [EMAIL PROTECTED]
> rspec edge revision 2910
> rspec_on_rails edge revision 2909
> rails edge revision 8175
>
I'd like to see something like this:
it_should_behave_like "a foo", :vari
Not even sure, what are your thoughts?
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge revision 2909
rails edge revision 8175
On Nov 21, 2007, at 4:31 PM, Scott Taylor wrote:
>
> On Nov 21, 2007, at 5:16 PM, Nathan Sutton wrote:
>
>> Ooh, I totally want to do this,
Oh, and the reason I include this is because it's always a question
when discussing things, and this makes it always available, both to
those reading now and those who may read these conversations in the
future.
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge rev
On Nov 21, 2007, at 5:16 PM, Nathan Sutton wrote:
> Ooh, I totally want to do this, I'll work on it this week along with
> my other patch i have yet to submit this week, unless Scott is partial
> to doing it. Do you want it, Scott?
Go for it. Let me know if you don't want it.
What is the synt
On Nov 21, 2007, at 5:31 PM, David Chelimsky wrote:
> On Nov 21, 2007 4:16 PM, Nathan Sutton <[EMAIL PROTECTED]>
> wrote:
>> Nathan Sutton
>> [EMAIL PROTECTED]
>> rspec edge revision 2910
>> rspec_on_rails edge revision 2909
>> rails edge revision 8175
>
> Have you added this to your signature?
On Nov 21, 2007 11:08 PM, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
>
> On Nov 22, 2007 9:01 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote:
> > On 11/21/07, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > Thanks for the prompt responses...
> > >
> > > On Nov 22, 2007 1:18 AM, David C
Yeah, I'm currently doing it manually though, and this email is only
for mailing lists.
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge revision 2909
rails edge revision 8175
On Nov 21, 2007, at 4:31 PM, David Chelimsky wrote:
> On Nov 21, 2007 4:16 PM, Nathan Su
On Nov 21, 2007 4:16 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote:
> Nathan Sutton
> [EMAIL PROTECTED]
> rspec edge revision 2910
> rspec_on_rails edge revision 2909
> rails edge revision 8175
Have you added this to your signature
___
rspec-users mail
Ooh, I totally want to do this, I'll work on it this week along with
my other patch i have yet to submit this week, unless Scott is partial
to doing it. Do you want it, Scott?
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge revision 2909
rails edge revision 8175
On Nov 21, 2007 3:53 PM, Scott Taylor <[EMAIL PROTECTED]> wrote:
>
> On Nov 21, 2007, at 4:22 PM, David Chelimsky wrote:
>
>
> > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> I want to be able to get at the described class in my shared
> >> behaviour. I'm
> >> sur
On 11/21/07, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> Hi,
> Thanks for the prompt responses...
>
> On Nov 22, 2007 1:18 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> > On Nov 21, 2007 1:07 AM, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > Googling 'RSpec describe scope' didn
On Nov 22, 2007 9:01 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote:
> On 11/21/07, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> > Hi,
> > Thanks for the prompt responses...
> >
> > On Nov 22, 2007 1:18 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> > > On Nov 21, 2007 1:07 AM, Mark Van De Vyver
On Nov 22, 2007 8:53 AM, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> Hi,
> Thanks for the prompt responses...
>
> On Nov 22, 2007 1:18 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> > On Nov 21, 2007 1:07 AM, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > Googling 'RSpec describe
On Nov 21, 2007, at 4:22 PM, David Chelimsky wrote:
> On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I want to be able to get at the described class in my shared
>> behaviour. I'm
>> sure an example will say it better than my words
>>
>> describe "my shared", :shared
On Nov 21, 2007 3:42 PM, Scott Taylor <[EMAIL PROTECTED]> wrote:
>
> On Nov 21, 2007, at 3:17 PM, aslak hellesoy wrote:
>
> > On 11/21/07, Chad Humphries <[EMAIL PROTECTED]> wrote:
> >> One of the recent trunk changesets modified the default behaviour to
> >> fail fast if duplicate examples are det
Hi,
Thanks for the prompt responses...
On Nov 22, 2007 1:18 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Nov 21, 2007 1:07 AM, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> > Hi,
> > Googling 'RSpec describe scope' didn't yield much, so apologies if
> > this question has been dealt with.
>
On Nov 21, 2007, at 3:17 PM, aslak hellesoy wrote:
> On 11/21/07, Chad Humphries <[EMAIL PROTECTED]> wrote:
>> One of the recent trunk changesets modified the default behaviour to
>> fail fast if duplicate examples are detected within a single
>> behaviour/
>> example group. This is basically
Some of this clears up my issues around sharing behaviors that you can
pass parameters to. I was doing a hackish solution before by
including a module then calling a method it provides, but now I can
have shared behaviors and just have them call specific methods which
then become a convent
On Nov 22, 2007 8:31 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote:
> On Nov 21, 2007 10:22 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> >
> > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I want to be able to get at the described class in my shared
> behavi
On Nov 21, 2007 10:22 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I want to be able to get at the described class in my shared behaviour. I'm
> > sure an example will say it better than my words
> >
> > describe "m
David to the rescue! :)
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge revision 2909
rails edge revision 8175
On Nov 21, 2007, at 3:22 PM, David Chelimsky wrote:
> On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I want to be able to get a
On Nov 22, 2007 8:22 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I want to be able to get at the described class in my shared behaviour.
> I'm
> > sure an example will say it better than my words
> >
> > describe "m
On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to be able to get at the described class in my shared behaviour. I'm
> sure an example will say it better than my words
>
> describe "my shared", :shared => true do
>
> it "should tell me what the class is its describi
yep
should == User
expected: User,
got: # (using ==)
On Nov 22, 2007 8:15 AM, Nathan Sutton <[EMAIL PROTECTED]> wrote:
> Did you try self.class
>
> ??
> Nathan Sutton
> [EMAIL PROTECTED]
> rspec edge revision 2910
> rspec_on_rails edge revision 2909
> rails edge revision 8175
>
>
>
> On Nov
Did you try self.class
??
Nathan Sutton
[EMAIL PROTECTED]
rspec edge revision 2910
rspec_on_rails edge revision 2909
rails edge revision 8175
On Nov 21, 2007, at 3:14 PM, Daniel N wrote:
> Hi,
>
> I want to be able to get at the described class in my shared
> behaviour. I'm sure an example
Hi,
I want to be able to get at the described class in my shared behaviour. I'm
sure an example will say it better than my words
describe "my shared", :shared => true do
it "should tell me what the class is its describing" do
how_do_i_get_the_user_class_here
end
end
describe User do
I can't figure out how to make the updates to allow for the route_form
method to return a url that matches the expected.
Here is a sample
route_for(:controller => :task, :action => :new).should == "/task/new"
If a task has to be created for a user, how exactly do I do this. The
following doesn't
On Nov 21, 2007 2:43 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote:
> One good idea is to add all your custom error messages to rails' default
> hash so you can change the wording of it whenever you want and the key can
> remain the same. That way if you need to change it you don't need to dive
> in
One good idea is to add all your custom error messages to rails'
default hash so you can change the wording of it whenever you want and
the key can remain the same. That way if you need to change it you
don't need to dive into your specs but can just change it in an
initializer or environm
On Nov 21, 2007 12:33 PM, Chris Olsen <[EMAIL PROTECTED]> wrote:
> When you said that, testing helps you by defining how our code will be
> used, seems to be close with Ben's mention of Kinderman's post which has
> already started me looking at things from a different angle, which is a
> good thing
On Nov 21, 2007 2:33 PM, Chris Olsen <[EMAIL PROTECTED]> wrote:
> When you start testing from the view to model, do you still use the
> scaffolded tests. I am not sure if it is just me, but when I have all
> these tests auto-created I find it somewhat distracting. I can see
> where writing them f
Hi
Just something that I have been finding very helpful sometimes when I
am stuck with "how could I test this?" moments is looking at the
Rails test suite.
At the moment I am working on testing our custom error_messages_for
methods and I have found looking at how the Rails tests in
acti
Thanks for the info.
@Ben
I like the top down approach that you mentioned. It definitely makes
more sense to why I would test the views and how it will better define
the model parameters.
@Scott
I think that I am currently on the same page as you. Right now I don't
use a mock model in my cre
On 11/21/07, Chad Humphries <[EMAIL PROTECTED]> wrote:
> One of the recent trunk changesets modified the default behaviour to
> fail fast if duplicate examples are detected within a single behaviour/
> example group. This is basically letting you know you have to "it"
> blocks in the behaviour wi
On Nov 21, 2007 5:05 PM, Patrick Aljord <[EMAIL PROTECTED]> wrote:
> > There is a msys branch of git that is extremely easy to install in
> > windows from this url: http://code.google.com/p/msysgit/ I tried it
> > and it seems to work pretty well
> >
>
> +1
>
> With this, Git is perfectly usable o
> There is a msys branch of git that is extremely easy to install in
> windows from this url: http://code.google.com/p/msysgit/ I tried it
> and it seems to work pretty well
>
+1
With this, Git is perfectly usable on Windows now, there is no reason
for not using it on this platform.
On Nov 21, 2007 10:22 AM, Chris Olsen <[EMAIL PROTECTED]> wrote:
> As for views I fail to see why testing it with a mock model does
> anything. Nothing is ensuring that when changes are made to the model
> that they will also be done to the mocks then causing the test to break.
> If anything, havi
On Nov 21, 2007, at 1:22 PM, Chris Olsen wrote:
> Testing models is great and would not be able to create anything
> without
> it, but I am finding testing the controllers and views is a pain.
>
> Rest based controllers don't seem to change that much when compared to
> the auto-generated code t
One of the recent trunk changesets modified the default behaviour to
fail fast if duplicate examples are detected within a single behaviour/
example group. This is basically letting you know you have to "it"
blocks in the behaviour with the same description.
Note: You may have this issue r
Check what spec is having problems, and look for duplicate it "should
etc." descriptions. I had this problem this morning too and found some
duplicate it "should " blocks.
-L
On Nov 21, 2007 1:12 PM, Scott Taylor <[EMAIL PROTECTED]> wrote:
> I svn up'ed this morning, to get the following message
Hey Chris,
I used to have the same thinking as you currently do. I found that my
view specs were brittle and offered false security. However, I actually
totally disagree with those statements now. The difference is how I have
been going about BDD. Before I would spec out my controllers then m
Testing models is great and would not be able to create anything without
it, but I am finding testing the controllers and views is a pain.
Rest based controllers don't seem to change that much when compared to
the auto-generated code that obviously works.
As for views I fail to see why testing it
I svn up'ed this morning, to get the following message with rake spec:
/Users/smt/src/web/urbis/trunk/vendor/plugins/rspec/lib/spec/example/
example_group_methods.rb:96:in `it': Duplicate example: 'should
contain the total number of messages' (RuntimeError)
Anyone have any ideas why this might
On Nov 21, 2007 6:11 PM, Lance Carlson <[EMAIL PROTECTED]> wrote:
> I'm at the very latest, not sure what that is, but I just updated and
> pulled down a bunch of new files related to the rake task and
> everything is working fine now.
>
For the future: svn info vendor/plugins/rspec
>
> On Nov 21
I'm at the very latest, not sure what that is, but I just updated and
pulled down a bunch of new files related to the rake task and
everything is working fine now.
On Nov 21, 2007 12:08 PM, aslak hellesoy <[EMAIL PROTECTED]> wrote:
> On Nov 21, 2007 2:12 AM, Lance Carlson <[EMAIL PROTECTED]> wrote
On Nov 21, 2007 2:12 AM, Lance Carlson <[EMAIL PROTECTED]> wrote:
> I'm running rspec and rspec on rails in svn external so I am running
> the latest version of the trunk.
revision?
> Recently the rake spec task started
> braking the continuous integration server because the rake aborted. I
> ch
Looks like a bunch of updates were made overnight to the rake task and
it works now. Serves me right for wanting to be on the edge. :)
On Nov 21, 2007 11:24 AM, Lance Carlson <[EMAIL PROTECTED]> wrote:
> Yea I tried that already, I will try again, but i replaced my local
> files and checked the di
Yea I tried that already, I will try again, but i replaced my local
files and checked the diff on the repo. I didn't see any changes in
the new files that would have any effect on the rake task. It updated
spec.opts and spec_helper.. I have stuff in spec_helper that is
application specific that sho
Thanks Jarkko!
OK that was embarrassingly simple. Maybe, I was just testing you, or not.
On Nov 21, 2007 1:12 AM, Jarkko Laine <[EMAIL PROTECTED]> wrote:
> Hi Troy,
>
> On 20.11.2007, at 22.21, Troy Nini wrote:
> > Output from running edit.haml_spec.r
> >
> > F
> >
> > 1
On Nov 21, 2007 1:07 AM, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> Hi,
> Googling 'RSpec describe scope' didn't yield much, so apologies if
> this question has been dealt with.
>
> It seem well known that a ruby class is 'visible' between describes,
> and if this is a problem then you should u
On 11/21/07, Mark Van De Vyver <[EMAIL PROTECTED]> wrote:
> Hi,
> Googling 'RSpec describe scope' didn't yield much, so apologies if
> this question has been dealt with.
>
> It seem well known that a ruby class is 'visible' between describes,
> and if this is a problem then you should use some coun
Hi,
Googling 'RSpec describe scope' didn't yield much, so apologies if
this question has been dealt with.
It seem well known that a ruby class is 'visible' between describes,
and if this is a problem then you should use some counter as prefix or
suffix:
'class Item_001; ... end'
Is there any work
How do you guys test transactional updates with story runner?
I have an action that needs to update four different models:
Enrollment.transaction do
@contact.update_addresses(params[:contact_address], params
[:billing_address])
@enrollment.update_attributes!(params[:enrollment
On Nov 21, 2007 1:15 AM, Sahyoun <[EMAIL PROTECTED]> wrote:
> Thanks. That helped. I now have:
>
> before do
> @address = mock_model(Address)
> @company = mock_model(Company)
> Company.stub!(:find_by_id).and_return(@company)
>
> @company.stub!(:addresses).and_return(@addresses)
>
On Nov 21, 2007 1:35 AM, Pat Maddox <[EMAIL PROTECTED]> wrote:
> On Nov 21, 2007 1:15 AM, Sahyoun <[EMAIL PROTECTED]> wrote:
> > Thanks. That helped. I now have:
> >
> > before do
> > @address = mock_model(Address)
> > @company = mock_model(Company)
> > Company.stub!(:find_by_id).and_re
Thanks. That helped. I now have:
before do
@address = mock_model(Address)
@company = mock_model(Company)
Company.stub!(:find_by_id).and_return(@company)
@company.stub!(:addresses).and_return(@addresses)
end
with only one error remaining:
'AddressesController handling GET /addr
There is a msys branch of git that is extremely easy to install in
windows from this url: http://code.google.com/p/msysgit/ I tried it
and it seems to work pretty well
On Nov 19, 2007 2:57 PM, Kevin Williams <[EMAIL PROTECTED]> wrote:
> On Nov 19, 2007 8:55 AM, Luis Lavena <[EMAIL PROTECTED]> wro
On 21.11.2007, at 9.42, Sahyoun wrote:
> Hello,
>
> I'm working with scaffold generated controller test code for
> handling GET requests. Address is the model being tested. Address
> belongs_to Company, Company has_many addresses.
> In my addresses_controller I have:
>
> before_filter :get_co
On 20.11.2007, at 10.08, Nathan Sutton wrote:
> Didn't have time tonight, stand-by for something tomorrow.
Done: http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/132-
plain-text-stories-should-support-given-and-given
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http:/
63 matches
Mail list logo