You can have a global after block in your spec_helper.rb that
undefines all such constants. Then you just have to remember to add
these constants to some global array whenever you define them.
a
On 9/21/07, Matt Margolis [EMAIL PROTECTED] wrote:
I have some specs that involve the use of eval
Hey,
sorry if this is something better suited to another list.
I've encountered a strange problem with the RSpec.tmbundle in trunk -
namely that it was raising an exception when pressing
ctrl-shift-downarrow (switch between spec and source - Alternate
File).
I tracked down the issue to be
BTW I also tried this:
template.stub!(:edit_label_url).and_return('')
but the same error continues to persist
On 9/21/07, Lance Carlson [EMAIL PROTECTED] wrote:
BTW I know this is old, but did you know you can do this?
iink_to a.name, [EMAIL PROTECTED], @project],,{:class=show,:title=Show
Have you seen shared behaviours?
On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote:
Hello,
Just decided to check whether I am doing something that makes sense
or not. I was thinking about how cool would it be to re-use examples
(just like we reuse story scenarios with GivenScenario). I
Please submit this to the tracker as a patch.
http://rubyforge.org/tracker/index.php?group_id=797
Thanks,
David
On 9/21/07, Trevor Squires [EMAIL PROTECTED] wrote:
Hey,
sorry if this is something better suited to another list.
I've encountered a strange problem with the RSpec.tmbundle in
On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote:
Sure! But they are not the same stuff. What I was looking for is
it should do #1 do
...
end
it should do X after #1 do
given_it should do #1
should do_x
end
it should do Y after #1 do
given_it should do #1
should do_y
Sure! But they are not the same stuff. What I was looking for is
it should do #1 do
...
end
it should do X after #1 do
given_it should do #1
should do_x
end
it should do Y after #1 do
given_it should do #1
should do_y
end
it should do Z after #1 Y do
given_it should do
This concept violates oo if you want to test whether or not r method calls
another method you would do that in the test and label it occordingly. What you
are defining is such a narrow use case I think it would be abused
Sent via BlackBerry from T-Mobile
-Original Message-
From: David
If you want to reuse stuff in your tests put those test methods in a separate
module and include them into you specs
Sent via BlackBerry from T-Mobile
-Original Message-
From: Yurii Rashkovskii [EMAIL PROTECTED]
Date: Fri, 21 Sep 2007 23:12:50
To:rspec-users rspec-users@rubyforge.org
Then I will have tens of methods that in fact has nothing really
different from reused examples
On Sep 21, 2007, at 11:14 PM, [EMAIL PROTECTED] wrote:
If you want to reuse stuff in your tests put those test methods in
a separate module and include them into you specs
Sent via BlackBerry
Ok, let me try to explain. I have some controllers that are doing
some kind of main action and some additional ones. These actions
are belong to different aspects of logic and thus
I'd prefer to test them separately to have clean and nice code that
can be easily modified.
Then, what's
On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote:
Then I will have tens of methods that in fact has nothing really
different from reused examples
But, as methods, they are more clearly differentiated for reuse.
The problem is that if I reuse an example, and then decide to change
that
I have to agree with David. (It's in the contract ;)
Scenarios are reusable as steps in order to chain multiple scenarios
together (to describe the various coarse-grained stages of a workflow,
state machine or wizard, for example).
At an example level it is just confusing. I've noticed that
sorry if this is something better suited to another list.
I've encountered a strange problem with the RSpec.tmbundle in trunk -
namely that it was raising an exception when pressing
ctrl-shift-downarrow (switch between spec and source - Alternate
File).
I tracked down the issue to be
I'm trying to generate stories based on Dan North's example.
I'm not sure how to do this.
require File.join(File.dirname(__FILE__), helper)
Story Account Holder withdraws cash, %{
As an Account Holder
I want to withdraw cash from an ATM
So that I can get money when the bank is closed
},
Yeah, I've filed a patch for it - #14140
Regards,
Trevor
On 9/21/07, Scott Taylor [EMAIL PROTECTED] wrote:
Nope - it's a bug. I've experienced the same thing too.
Scott
--
--
Trevor Squires
http://somethinglearned.com
___
rspec-users mailing
16 matches
Mail list logo