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, :method
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
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
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
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 is
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
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
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.
On Mon, Mar 2, 2009 at 8:20 AM, Bart Zonneveld zuperinfin...@gmail.com 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
...
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 related
On 2-mrt-2009, at 16:50, David Chelimsky wrote:
On Mon, Mar 2, 2009 at 8:20 AM, Bart Zonneveld
zuperinfin...@gmail.com 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
On Mon, Mar 2, 2009 at 10:07 AM, James Byrne li...@ruby-forum.com 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
On Mon, Mar 2, 2009 at 10:23 AM, Bart Zonneveld zuperinfin...@gmail.com wrote:
On 2-mrt-2009, at 16:50, David Chelimsky wrote:
On Mon, Mar 2, 2009 at 8:20 AM, Bart Zonneveld zuperinfin...@gmail.com
wrote:
On 28-feb-2009, at 11:45, MAwiniarski wrote:
Greetings,
How to write Example which
On Mon, Mar 2, 2009 at 8:23 AM, Bart Zonneveld zuperinfin...@gmail.com 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 =
On Sun, Mar 1, 2009 at 9:07 PM, Stephen Eley sfe...@gmail.com 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
On Mon, Mar 2, 2009 at 7:31 AM, James Byrne li...@ruby-forum.com 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
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) Create
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 object
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
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
- Original Message
From: James Byrne li...@ruby-forum.com
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
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 role
On Mon, Mar 2, 2009 at 4:50 PM, Zach Dennis zach.den...@gmail.com wrote:
On Mon, Mar 2, 2009 at 3:59 PM, James Byrne li...@ruby-forum.com 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
On Mon, Mar 2, 2009 at 3:59 PM, James Byrne li...@ruby-forum.com 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
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 phlip2...@gmail.com 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
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:
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
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,
On Mon, Mar 2, 2009 at 5:16 PM, Zach Dennis zach.den...@gmail.com 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
On Mon, Mar 2, 2009 at 11:35 PM, Stephen Eley sfe...@gmail.com wrote:
On Mon, Mar 2, 2009 at 5:16 PM, Zach Dennis zach.den...@gmail.com 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
On Mon, Mar 2, 2009 at 8:35 PM, Stephen Eley sfe...@gmail.com 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
On Tue, Mar 3, 2009 at 1:04 AM, Mark Wilden m...@mwilden.com wrote:
On Mon, Mar 2, 2009 at 8:35 PM, Stephen Eley sfe...@gmail.com 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
34 matches
Mail list logo