Trying the next release of rspec, I have had to make changes in the
existing specs for routing.
I have written an script with sed that makes this automatically (two
files)
spec/upgrade.sed
/route_for/s/id => 1/id => "1"/g
/route_for.*create/s/== \(["'].*["']\)/== {:path => \1, :m
John Ivanoff wrote:
Thanks for all the help. With the
puts response.body
I was able so see what was going on. I know that I am now deleting the
third frooble
Now when
Then I should see the following froobles:
I get this error
--
Then I should see the following
Hi Tom,
We have written an extension that counts your tests and provides a
link(s) to the failure backtrace in the Cucumber HTML.
There seem to be issues when Cucumber writes to the HTML over around
800 steps, so we are waiting for version 0.2.
Aidy
On 26/02/2009, Tom ten Thij wrote:
> We will
On 28-feb-2009, at 21:04, Joe Van Dyk wrote:
Is it possible to have a scenario where you are testing the
interaction between two different session?
If you mean something along these lines:
User A uploads a picture,
User B logs in to see the picture uploaded by User A
that is possible.
I us
On 2-mrt-2009, at 4:08, Phlip wrote:
David Chelimsky wrote:
ty wrote:
We just start using RSpec and rspec_on_rails for a existing Rails
project.
No unit tests, right?
After run script/generate rspec. It only generate the structure
folders.
We've got quite a few controllers and models.
On 28-feb-2009, at 11:45, MAwiniarski wrote:
Greetings,
How to write Example which will check if model's variable's
format is valid using :on => :create, like this:
class User < ActiveRecord::Base
...
validates_format_of :email, :with => /.../, :on => :create
...
Using following code
Personally I think this should be in the model layer. As you've pointed it
you get alot of repetition if its in the controller layer. But putting
business logic in the controller layer goes against the fundamentals of MVC,
and is a bit of a Rails anti-pattern (fat controller).
So given that the ru
The more I work with BDD the more I realize how different this is from
my previous experience. I now consider that part of the difficulty I
have lies in establishing the proper scale for the features that I
propose. My question lies in that vein. What size should a feature be?
I have read a gre
On 2-mrt-2009, at 16:07, James Byrne wrote:
The more I work with BDD the more I realize how different this is from
my previous experience. I now consider that part of the difficulty I
have lies in establishing the proper scale for the features that I
propose. My question lies in that vein. W
On Mon, Mar 2, 2009 at 8:20 AM, Bart Zonneveld wrote:
>
> On 28-feb-2009, at 11:45, MAwiniarski wrote:
>
>> Greetings,
>>
>> How to write Example which will check if model's variable's
>> format is valid using :on => :create, like this:
>>
>> class User < ActiveRecord::Base
>> ...
>> validates_fo
Andrew Premdas wrote:
> James,
>
> I'd question whether you need to give a monkey's about 'entity'. Whilst
> it maybe an essential concept in the overall legal framework that doesn't
> mean it has to be in YOUR world. If your software is about recording services
> provided to some client and re
On 2-mrt-2009, at 16:50, David Chelimsky wrote:
On Mon, Mar 2, 2009 at 8:20 AM, Bart Zonneveld
wrote:
On 28-feb-2009, at 11:45, MAwiniarski wrote:
Greetings,
How to write Example which will check if model's variable's
format is valid using :on => :create, like this:
class User < ActiveR
On Mon, Mar 2, 2009 at 10:07 AM, James Byrne wrote:
>
> I have read a great deal about scaling features in terms of hours of
> work. However, at my present level of inefficiency, that will probably
> result in features that are too small just as I now believe that the
> features I have now are to
On Mon, Mar 2, 2009 at 10:23 AM, Bart Zonneveld wrote:
>
> On 2-mrt-2009, at 16:50, David Chelimsky wrote:
>
>> On Mon, Mar 2, 2009 at 8:20 AM, Bart Zonneveld
>> wrote:
>>>
>>> On 28-feb-2009, at 11:45, MAwiniarski wrote:
>>>
Greetings,
How to write Example which will check if mode
On Mon, Mar 2, 2009 at 8:23 AM, Bart Zonneveld wrote:
>
> On a second note, I noticed rspec default generated model specs now use
> Model.create!(@valid_attributes) as their default "all is valid" test.
> What's the advantage of this approach? I just write @model.attributes =
> @valid_attributes;
On Sun, Mar 1, 2009 at 9:07 PM, Stephen Eley wrote:
>
> For date testing, I've just discovered and successfully used Notahat's
> "time_travel" plugin:
> http://github.com/notahat/time_travel/
We have just been stubbing Time.now, but I'll think about time_travel.
One advantage would be not having
On Mon, Mar 2, 2009 at 7:31 AM, James Byrne wrote:
> Whether or not a client is a
> stand-alone design element or is dependent upon a superior element of
> abstraction is really quite beside the point insofar as the presentation
> of the system to the user is concerned.
I like to focus on that k
Andrew Premdas wrote:
> So given that the rules should be in the model then the question is
> which part of the model should have this responsibility and how do
> you call it.
> Three choices come to mind here
>
> 1) Place the rule inside User
> 2) Place the rule inside the affected model
> 3)
On Mon, Mar 2, 2009 at 10:39 AM, James Byrne wrote:
>
> I am not sure that this is really "pollution". One of the things that
> was pointed out to me on the Ruby list when I first began transitioning
> to OO was the mantra "ask" don't "tell".
Actually, it's the other way around.
http://www.prag
James Byrne wrote:
>
> I am not sure that this is really "pollution". One of the things that
> was pointed out to me on the Ruby list when I first began transitioning
> to OO was the mantra "ask" don't "tell". It seems to me that in an OO
> authorization scheme one might properly ask the use
Mark Wilden wrote:
>
> Actually, it's the other way around.
>
> http://www.pragprog.com/articles/tell-dont-ask
>
I have read this article and it leaves me rather more confused than not.
I gather that I am missing something fundamental. Consider that when I
write x.to_s I am telling the obje
Mark Wilden wrote:
>
>
> Actually, it's the other way around.
>
> http://www.pragprog.com/articles/tell-dont-ask
Sigh...
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/li
James Byrne wrote:
Is this a semantic confusion on my part? Should I consider that what I
do with x.exists? is tell the object to answer a question?
Consider...
if x.exists?
x.important_method()
else
# nothing!
end
Now lets upgrade the variable x. Sometimes it points to a thin
- Original Message
> From: James Byrne
> Mark Wilden wrote:
> > Actually, it's the other way around.
> >
> > http://www.pragprog.com/articles/tell-dont-ask
>
> I have read this article and it leaves me rather more confused than not.
That's the danger of oversimplification. Anoth
unknown wrote:
>
>> sam.authorized?(controller_or_model, action)?
>
> I'll suggest that it's the controllers who are responsible for telling
> what role or other requirements need to be satisfied to get their
> services, and that it's the job of the user object (maybe by delegating
> to some
On Mon, Mar 2, 2009 at 4:50 PM, Zach Dennis wrote:
> On Mon, Mar 2, 2009 at 3:59 PM, James Byrne wrote:
>> unknown wrote:
>>
>>>
sam.authorized?(controller_or_model, action)?
>>>
>>> I'll suggest that it's the controllers who are responsible for telling
>>> what role or other requirements ne
On Mon, Mar 2, 2009 at 3:59 PM, James Byrne wrote:
> unknown wrote:
>
>>
>>> sam.authorized?(controller_or_model, action)?
>>
>> I'll suggest that it's the controllers who are responsible for telling
>> what role or other requirements need to be satisfied to get their
>> services, and that it's th
Once again – thanks a ton for your response! I wish ‘The RSpec Book’
answered my use cases; I bought it hoping I’ll learn all this stuff from
it, but it seems the most interesting chapters are not written yet. :)
Matt Wynne:
> Assuming you wanted to keep your focus on the Decomposer class, but
On Sun, Mar 1, 2009 at 10:08 PM, Phlip wrote:
> David Chelimsky wrote:
>
>> ty wrote:
>
>>> We just start using RSpec and rspec_on_rails for a existing Rails
>>> project.
>
> No unit tests, right?
>
>>> After run script/generate rspec. It only generate the structure
>>> folders.
>>> We've got quit
On 2 Mar 2009, at 23:32, Shot (Piotr Szotkowski) wrote:
Once again – thanks a ton for your response! I wish ‘The RSpec Book’
answered my use cases; I bought it hoping I’ll learn all this stuff
from
it, but it seems the most interesting chapters are not written yet. :)
Matt Wynne:
Assuming
On 26 Feb 2009, at 15:33, Tom ten Thij wrote:
We will be using Cucumber for a fairly large project. Are there any
areas that cucumber is lacking when there are many scenarios?
I believe the best candidate for showing our client the scenario
results is the html output. It strikes me that that b
Absolutely. I'd respectfully suggest that this is more a requirement
of the way the step definition or test fixture that implements the
feature needs to behave than the intent of describing time based logic
in a natural language such that product owners, ba's etc. can write
them (i.e. Cucumber, Fit
On Mon, Mar 2, 2009 at 5:16 PM, Zach Dennis wrote:
>
> Forgot to mention what we did do. We ended up with the following...
>
> def index
> if user.has_role?("admin")
> user.in_role("admin").invoices
> elsif user.has_role?("associate")
> user.in_role("associate").invoices
> else
> raise
On Sat, Feb 28, 2009 at 5:26 PM, Chris Flipse wrote:
>
> Half of my problem right now is that I'm not even sure what layer to put
> model specific authentication! If it's in the controller layer, it's
> repeated logic in every controller that touches the model in question. If
> it's in the model
On Mon, Mar 2, 2009 at 11:35 PM, Stephen Eley wrote:
> On Mon, Mar 2, 2009 at 5:16 PM, Zach Dennis wrote:
>>
>> Forgot to mention what we did do. We ended up with the following...
>>
>> def index
>> if user.has_role?("admin")
>>user.in_role("admin").invoices
>> elsif user.has_role?("associa
On Mon, Mar 2, 2009 at 8:35 PM, Stephen Eley wrote:
> �...@invoices = Invoice.by_role(user)
It doesn't seem right to me that invoices know about users and roles.
I think of invoices are being closer to the metal -- closer to the
essence of the application -- than petty concerns like authorizatio
On Tue, Mar 3, 2009 at 1:04 AM, Mark Wilden wrote:
> On Mon, Mar 2, 2009 at 8:35 PM, Stephen Eley wrote:
>
>> �...@invoices = Invoice.by_role(user)
>
> It doesn't seem right to me that invoices know about users and roles.
>
> I would try something like
> user.role.invoices
Heh. Which is what Z
37 matches
Mail list logo