David Chelimsky-2 wrote:
>
>
> It depends on how high you have your magnifying glass set. Really!
>
> Here's how I'd get there:
>
> In an integration test, which I use as ... well ... integration tests
> (i.e. pretty close to end to end - just no browser, so the javascript
> can't get tested)
hypothetical question for all you BDD experts:
I want to make sure that a :list action always returns widgets in
alphabetical order. There's at least 2 ways of doing this:
it "should fetch items in alphabetical order" do
Widget.should_receive(:find).with(:order => "name ASC")
get :list
end
On 8/22/07, David Green <[EMAIL PROTECTED]> wrote:
>
> I have a couple of methods which make networks calls. Where's the best
> place
> to stub them so they are stubbed for every description automatically? I
> tried in spec_helper.rb but they are no longer stubbed wh
I have a couple of methods which make networks calls. Where's the best place
to stub them so they are stubbed for every description automatically? I
tried in spec_helper.rb but they are no longer stubbed when a spec runs.
at the moment, I'm checking for the test environment in the methods
themse
David Chelimsky-2 wrote:
>
> On 8/5/07, David Green <[EMAIL PROTECTED]> wrote:
>>
>> that's a great point, but there are some things about shared behaviours I
>> don't like. for example, I have 14 different contexts I'm testing (and
>> mor
ce variables in the before() method,
but they're only available in the example block, not from the example title
these are minor complaints really, but as my project grows, they become more
of an issue.
David Chelimsky-2 wrote:
>
> On 8/4/07, David Green <[EMAIL PROTECTED]> wrote:
&
I have a lot of controllers with virtually identical functionality for most
actions. I've been using shared behaviours to DRY things up a bit, but I
still have to create separate behaviours for each context before I can use
the shared behaviours
what I have now is a generic file which contains al
as my rails application gets bigger, I find I'm writing the same generic
specs for standard CRUD operations. with 8 controllers so far, and more to
come, I'm keen to reduce the duplication. I asked before about generating
specs dynamically in this thread :
http://www.nabble.com/dynamic-specs-tf39