On 15 Sep 2008, at 21:14, Tim Glen wrote:
Hey all,
I've got some code that I (mostly) inherited. It essentially has a
couple of AR class methods that look for a specific record by id:
class Project < ActiveRecord::Base
class << self
def specific_project
@another_specific_project
On 15 Sep 2008, at 23:16, Zach Dennis wrote:
On Mon, Sep 15, 2008 at 5:32 PM, Jonathan Linowes
<[EMAIL PROTECTED]> wrote:
Hi,
suggestions how to add w3 validation to a story step?
eg
Then the page should be valid
You could write a "then" step that takes the current response.body,
uploads it
Please help me to understand why runner is not picking steps.
http://pastie.org/273126
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Thanks, that did the trick.
And for including ApplicationHelper, I would say it should include it -
because that would parallel Rails' standard behavior.
On Mon, Sep 15, 2008 at 3:34 PM, David Chelimsky <[EMAIL PROTECTED]>wrote:
> On Mon, Sep 15, 2008 at 4:06 PM, Christopher Bailey
> <[EMAIL PRO
On Mon, Sep 15, 2008 at 9:54 AM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>>Doesn't RR already support test spy?
> I don't believe so. There is nothing on the github page or anything I
> can spot in the current code in git. The github docs do mention it as
> something they are aiming to do.
No, spies
On Mon, Sep 15, 2008 at 4:06 PM, Christopher Bailey
<[EMAIL PROTECTED]> wrote:
> If I don't include them, then the helpers in LocationsHelper can't find/use
> the helpers in ApplicationHelper. Maybe this will help illustrate:
> test code:
> describe LocationsHelper do
> describe "location tree"
On Mon, Sep 15, 2008 at 5:32 PM, Jonathan Linowes
<[EMAIL PROTECTED]> wrote:
> Hi,
> suggestions how to add w3 validation to a story step?
> eg
> Then the page should be valid
>
You could write a "then" step that takes the current response.body,
uploads it to the w3 validator, and checks the the r
Hi,
suggestions how to add w3 validation to a story step?
eg
Then the page should be valid
tia
linoj
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Mon, Sep 15, 2008 at 2:28 PM, Pat Maddox <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 12:54 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>>>Doesn't RR already support test spy?
>> I don't believe so. There is nothing on the github page or anything I
>> can spot in the current code in git.
On Mon, Sep 15, 2008 at 11:01 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
> Tim Glen wrote:
>> 1. Is there a way to stub out the model to return some fixture-type
>> records?
>> 2. Does anyone have an idea as to how we could refactor this into a
>> better pattern? Those 2 "projects" are pretty speci
On Mon, Sep 15, 2008 at 4:01 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
> Tim Glen wrote:
>> 1. Is there a way to stub out the model to return some fixture-type
>> records?
>> 2. Does anyone have an idea as to how we could refactor this into a
>> better pattern? Those 2 "projects" are pretty specif
Thankyou Chad and Aslak, those patches seem to have worked perfectly
- time to apply the threshold crank! [rubs hands gleefully]
On 13 Sep 2008, at 16:50, Chad Humphries wrote:
I've got a version of rcov up at github (sudo gem install
spicycode-rcov --source=http://gems.github.com/) incorpora
If I don't include them, then the helpers in LocationsHelper can't find/use
the helpers in ApplicationHelper. Maybe this will help illustrate:
test code:
describe LocationsHelper do
describe "location tree" do
it "should not show siblings for state, country, or root level
locations" do
Tim Glen wrote:
> 1. Is there a way to stub out the model to return some fixture-type
> records?
> 2. Does anyone have an idea as to how we could refactor this into a
> better pattern? Those 2 "projects" are pretty specific to the
> production data and will "never be edited," but it still doesn't m
On Mon, Sep 15, 2008 at 4:14 PM, Tim Glen <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I've got some code that I (mostly) inherited. It essentially has a couple of
> AR class methods that look for a specific record by id:
>
> class Project < ActiveRecord::Base
> class << self
>def specific_projec
Hey all,
I've got some code that I (mostly) inherited. It essentially has a
couple of AR class methods that look for a specific record by id:
class Project < ActiveRecord::Base
class << self
def specific_project
@another_specific_project ||= Project.find(10) if
Project.exists?(1
On Mon, Sep 15, 2008 at 12:54 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>>Doesn't RR already support test spy?
> I don't believe so. There is nothing on the github page or anything I
> can spot in the current code in git. The github docs do mention it as
> something they are aiming to do.
>
>> o =
On Mon, Sep 15, 2008 at 12:26 PM, Christopher Bailey
<[EMAIL PROTECTED]> wrote:
> I'm trying to test some of my helpers. I have one helper (in module
> LocationsHelper) that calls a helper/method in ApplicationHelper. If I
> include ApplicationHelper and LocationHelper in my spec, and then I call
I'm trying to test some of my helpers. I have one helper (in module
LocationsHelper) that calls a helper/method in ApplicationHelper. If I
include ApplicationHelper and LocationHelper in my spec, and then I call the
helper using the "helper." scope:
helper.location_tree('Portland')
then it com
It's all gone a bit meta.
I've started noticing patterns in my specs, where I want more than
one class to satisfy a specific bunch of behaviours.
I know I can use it_should_behave_like and this works in simple
cases, but I want to be able to iterate around an array of values and
generate
>Doesn't RR already support test spy?
I don't believe so. There is nothing on the github page or anything I
can spot in the current code in git. The github docs do mention it as
something they are aiming to do.
> o = stub("stub", :foo => true)
> o.foo
> o.should have_received(:foo)
That sounds
On Mon, Sep 15, 2008 at 4:00 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 8:55 AM, Joseph Wilk-2
> <[EMAIL PROTECTED]> wrote:
>>
>>>I like this much better. -Guiding people to use regexen properly is
>>>better than redefining their semantics.
>>
>> Well put. Do you mind
On Mon, Sep 15, 2008 at 8:55 AM, Joseph Wilk-2
<[EMAIL PROTECTED]> wrote:
>
>>I like this much better. -Guiding people to use regexen properly is
>>better than redefining their semantics.
>
> Well put. Do you mind if I add this David?
Well - it turns out that this is slightly more complicated. The
>I like this much better. -Guiding people to use regexen properly is
>better than redefining their semantics.
Well put. Do you mind if I add this David?
Thanks,
Joseph Wilk
--
View this message in context:
http://www.nabble.com/Cucumber---Ambiguous-steps-tp19480001p19493430.html
Sent from th
David Chelimsky wrote:
> On Mon, Sep 15, 2008 at 8:21 AM, David Chelimsky <[EMAIL PROTECTED]>
> wrote:
>> anyone have good examples where they would?
>>> you just stick a $ at the end of the Regexp?
>>>
>>> That's how regexen work. I don't see why they should work any
>>> differently when used
On Mon, Sep 15, 2008 at 3:27 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 8:21 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>> On Mon, Sep 15, 2008 at 8:13 AM, aslak hellesoy
>> <[EMAIL PROTECTED]> wrote:
>>> On Mon, Sep 15, 2008 at 3:07 PM, Joseph Wilk <[EMAIL PROTECT
On Mon, Sep 15, 2008 at 8:21 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 8:13 AM, aslak hellesoy
> <[EMAIL PROTECTED]> wrote:
>> On Mon, Sep 15, 2008 at 3:07 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>>> David Chelimsky wrote:
On Mon, Sep 15, 2008 at 3:54 AM, Jose
On Mon, Sep 15, 2008 at 8:13 AM, aslak hellesoy
<[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 3:07 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>> David Chelimsky wrote:
>>> On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTED]>
>>> wrote:
You can still use non-regular expressio
On Mon, Sep 15, 2008 at 3:07 PM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
> David Chelimsky wrote:
>> On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTED]>
>> wrote:
>>> You can still use non-regular expression steps in Cucumber:
>>>
>>> I've been unable to think of a good example where I
David Chelimsky wrote:
> On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTED]>
> wrote:
>> You can still use non-regular expression steps in Cucumber:
>>
>> I've been unable to think of a good example where I would want only a
>> partial match of a step. Throwing away the unmatched char
On Mon, Sep 15, 2008 at 2:56 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 7:49 AM, aslak hellesoy
> <[EMAIL PROTECTED]> wrote:
>> On Mon, Sep 15, 2008 at 2:40 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>>> On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTE
On Mon, Sep 15, 2008 at 7:49 AM, aslak hellesoy
<[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 2:40 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
>> On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>> Then /I should see "(.*)" in the page/ do |text|
That
On Mon, Sep 15, 2008 at 7:18 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 5:09 AM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
>> Thanks to a pointer from lizkeogh.com site I've been discovering the joy
>> of the Mockito (http://mockito.org/) mocking framework for Java. It
>>
On Mon, Sep 15, 2008 at 2:40 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
> Then /I should see "(.*)" in the page/ do |text|
>>>
>>> That should raise an AmbiguousStep error if you also have /I should
>>> see "(.*)"/.
>
On Mon, Sep 15, 2008 at 8:43 AM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 15, 2008 at 7:39 AM, Pat Maddox <[EMAIL PROTECTED]> wrote:
>>> So I'm proposing the idea of adding 'should_have_received' and test_spy
>>> in Rspec:
>>>
>>> ---
>>> x = test_spy('like a mock but more into espi
On Mon, Sep 15, 2008 at 3:54 AM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
Then /I should see "(.*)" in the page/ do |text|
>>
>> That should raise an AmbiguousStep error if you also have /I should
>> see "(.*)"/.
>
> Oops sorry, thanks for spotting that David.
>
> It seems that it would be good
On Mon, Sep 15, 2008 at 7:39 AM, Pat Maddox <[EMAIL PROTECTED]> wrote:
>> So I'm proposing the idea of adding 'should_have_received' and test_spy
>> in Rspec:
>>
>> ---
>> x = test_spy('like a mock but more into espionage')
>>
>> #Action which does not fail on unexpected method but just records cal
> So I'm proposing the idea of adding 'should_have_received' and test_spy
> in Rspec:
>
> ---
> x = test_spy('like a mock but more into espionage')
>
> #Action which does not fail on unexpected method but just records calls.
> some.action(x)
>
> x.should_have_received(:method).and_returned_with('so
On Mon, Sep 15, 2008 at 5:09 AM, Joseph Wilk <[EMAIL PROTECTED]> wrote:
> Thanks to a pointer from lizkeogh.com site I've been discovering the joy
> of the Mockito (http://mockito.org/) mocking framework for Java. It
> verifies behaviour after the action. It struck me how this matched the
> format
Thanks to a pointer from lizkeogh.com site I've been discovering the joy
of the Mockito (http://mockito.org/) mocking framework for Java. It
verifies behaviour after the action. It struck me how this matched the
format I use in my Ruby cucumber features. Within Rspec if we could use
post behaviour
This is what I was trying to accomplish
Then I should see "My product name"
And I should see "My product description"
And I should see "My product name was successfully saved."
After reading all the comments above, the follwing step name solves my
problem
Then /I should see "(.*?)"$/ do |text|
>>> Then /I should see "(.*)" in the page/ do |text|
>
> That should raise an AmbiguousStep error if you also have /I should
> see "(.*)"/.
Oops sorry, thanks for spotting that David.
It seems that it would be good practice to use $ and ^ in all your
regular expression steps in order to minimis
42 matches
Mail list logo