Hi all,
I've found myself writing a thing I think is less than optimal, looking for
suggestions. The context is, I'm testing a result, and as a part of that test,
I might verify two or three things, which are individually relevant but not
really discrete results (?).
Here's my thinking proce
I'm starting to wonder if this is a good idea to begin with. I had started to
suggest nested it()s:
it "..." do
it "something more" do
end
end
... but it's already handled by the existing nested describe(), before(), it()
system.
I guess if we were shooting for flexibility, we might as
I do like try_to do...end.or_report - much better for the case where I'm not
trying to generate documentation.
I'm not sure it works so well for the case where I want to generate an extra
element of documentation, though this might be just an implementation detail.
.or_report
.or_document
.or_
Passing the it() and describe() args through to the reporting layer sounds like
a great idea. I've thought more about the reporting-levels approach. The
numeric as I postulated earlier is probably not the most useful thing.
As a product manager, I want to be able to flexibly present the appr
I'm encountering an interesting symptom during example execution. I'm
making a shared example group that dries up belongs-to-me before_filter
testing, and it makes a callback to the example group that says
it_should_behave_like that. The callback tells the shared example
where to expect a redire
thanks, Ben - that didn't do the trick, though.
I traced it down as far as this:
the controller hasn't initialized its current url - that's the immediate cause
of the method-on-nil complaint. It hasn't, because the controller isn't
technically handling a request yet (i.e., process()). I trie
Okay, following up on this item. Would you believe a workaround of
(gasp) get :index, prior to expecting route-based URLs to work? (slaps
forehead). or do_action(), provided by the host example group (the
more concrete example group, I mean - what's the right terminology
there?).
I
tried repro
A question for edumacational purposes here: Instead of disabling transactions,
would it be effective to include all the steps of inserting the record and
running the search, inside one scenario?
Given [the record is added to the database"
When [I search for it]
Then [I should find it]
If this
Done:
http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/692-route-based-_url-or-_path-functions-dont-work-until-getpost-are-called
Randy
- Original Message
> From: David Chelimsky
> To: rspec-users
> Sent: Tuesday, February 10, 2009 12:15:48 PM
> Subject: Re: [rspec-users]
I ported some stories from restful_authentication so that they can use
cucumber, and it worked fine in `rake features`.
Now when I try to run under autospec or `cucumber features`, I'm getting
failures with undefined method `get'. When I change 'get' to 'visit', same
symptom (undefined method
I'm running it like so:
$ cucumber features/
I've also tried using
--require config/boot.rb --require features
--require config/environment.rb
and now, I've tried with
--require lib --require features features/ (nope)
--require features --require lib features/ (yes!)
Shazyam
- 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
- Original Message
> From: John Small
[David:]
> > In the project root (or wherever you're typing commands from).
> Is this documented anywhere, or are people expected to just know it?
I added the information to the wiki in one or two places, having been bitten by
the same expecta
Aslak:
> some gmail lag issue going on here?
Not sure who's causing the lag, but yeah.
My hope was to help in a way that I could, freeing the "big guns" to focus on
things I'm less suited for at this moment.
Randy
___
rspec-users mailing list
rspec
From: aslak hellesoy
> Here is an alternative: http://gist.github.com/99376
I'm a fan of simple, which means I'm a fan of this. The only thing I can think
of that would be simpler is this:
* When the arity of the matcher is larger by one than the match
- Original Message
> From: David Chelimsky
> Shared examples don't support parameterization, but macros do. Try
> something like this:
>
> module Macros
> def shows_yearly_archive_for(requests={})
[...]
> end
> end
>
> describe SomeController do
> extend Macros
> shows_yearl
I finally figured this out.
lambda { route_for(:controller => "designs", :action => "create").should ==
"anything" }.should raise_error( ActionController::RoutingError )
The clue was that I wasn't getting a routing error until I tried to compare
route_for() with something. route_for() seems t
David, thank you for your reply on this. I really dig the expect { }.to
raise_error() syntax!!
To clarify: All the things you're claiming match my expectation.
Unfortunately, my expectation does not match reality according to my tests.
The thing is, route_for([bad stuff]) does not in and of
Here's another interesting symptom. After tracing through the code, I've come
to the understanding that the current implementation (delegated to outside
rspec, I understand) of route "generation" is not
testing generation at all, but rather is using backward-recognition as a proxy.
Further, t
Okay, after such a harsh analysis of the problem, I figured it was worth
digging in just a little bit more. Side note, some of what I was seeing
yesterday was a by-product of having default routes still existing. But there
are still some essential facts that remain, which I present here.
1.
>
>From: Adam Anderson
>
>Would using this kind of technique require me to use that intention-revealing
>method to be used in place of Time.now everywhere in the app? That is what it
>seems like to me and if that's the case then I couldn't see myself doing a
>Find/Replace across the entire a
- Original Message
> From: Matt Wynne
> Don't forget the session is thrown away for each scenario, so if you're
> starting
> a new scenario you wont' be logged in, by default.
I wonder if that is true also when Webrat/Selenium or Celerity is involved?
Randy
_
22 matches
Mail list logo