I want to extract the method for logging in so that I don't have to include
it in each before call.
Is it bad to use a describe block within the rspec_helper in a rails project
for controller tests?
I have in my spec_helper.rb
describe "an authenticated request", :shared => true do
before( :ea
Hi,
I'm trying to setup a mock for my controller test but I can't get it to
recognise the mock.
I use
it "should find all users" do
User.should_receive(:find).with( :all, :limit => 10
).and_return([EMAIL PROTECTED])
do_get
end
and in the controller
@users = User.find(:all, :limit => 10
My Bad... Please ignore
On 7/10/07, Daniel N <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to setup a mock for my controller test but I can't get it to
recognise the mock.
I use
it "should find all users" do
User.should_receive(:find).with( :all, :limit => 10
).and_return([EMAIL PROTECTED]
On Jul 9, 2007, at 5:00 PM, Daniel N wrote:
My Bad... Please ignore
On 7/10/07, Daniel N <[EMAIL PROTECTED]> wrote:
it "should find all users" do
User.should_receive(:find).with( :all, :limit => 10 ).and_return
([EMAIL PROTECTED])
do_get
end
Sorry for piggybacking on your post,
On 7/9/07, Johan Sørensen <[EMAIL PROTECTED]> wrote:
Is there a way in RSpec to check for a specific hash key (or evaluating
other things along those lines) in the parameter expectation using the
should_receive(:find).with(...) construct?
As opposed to getting into complicated mocking scen
On Jul 9, 2007, at 5:38 PM, Josh Knowles wrote:
On 7/9/07, Johan Sørensen <[EMAIL PROTECTED]> wrote:
Is there a way in RSpec to check for a specific hash key (or
evaluating other things along those lines) in the parameter
expectation using the should_receive(:find).with(...) construct?
On 7/9/07, Josh Knowles <[EMAIL PROTECTED]> wrote:
>
>
> On 7/9/07, Johan Sørensen <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > Is there a way in RSpec to check for a specific hash key (or evaluating
> other things along those lines) in the parameter expectation using the
> should_receive(:fi
On Jul 9, 2007, at 5:42 PM, David Chelimsky wrote:
As opposed to getting into complicated mocking scenarios, consider
abstracting this logic into your model:
http://blog.caboo.se/articles/2007/6/19/rspec-notes-from-the-
trenches-2
Agreed that this is a good approach in terms of dealing w/ r
On 7/9/07, Johan Sørensen <[EMAIL PROTECTED]> wrote:
>
>
> On Jul 9, 2007, at 5:42 PM, David Chelimsky wrote:
>
>
>
>
>
>
> As opposed to getting into complicated mocking scenarios, consider
>
> abstracting this logic into your model:
>
> http://blog.caboo.se/articles/2007/6/19/rspec-notes-from-the
Hi Folks,
I think I've run into a problem after upgrading to edge rspec [revision
2160], but I'm not sure where to fix things.
Default controller specs that look like this:
require File.dirname(__FILE__) + '/../spec_helper'
describe
Did you run "ruby script/generate rspec"?
http://rspec.rubyforge.org/upgrade.html
On 7/9/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> I think I've run into a problem after upgrading to edge rspec [revision
> 2160], but I'm not sure where to fix things.
>
> Default controll
David Chelimsky wrote:
> Did you run "ruby script/generate rspec"?
Yep; but this time I let it regenerate spec.opts
Turns out that the --drb flag is the culprit.
I'll file (or look for a similar) bug report.
Edward
___
rspec-users mailing list
rspec-
On 7/9/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote:
> David Chelimsky wrote:
> > Did you run "ruby script/generate rspec"?
>
> Yep; but this time I let it regenerate spec.opts
>
> Turns out that the --drb flag is the culprit.
I don't understand how --drb is related to this. You said you we
David Chelimsky wrote:
> On 7/9/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote:
>> David Chelimsky wrote:
>>> Did you run "ruby script/generate rspec"?
>> Yep; but this time I let it regenerate spec.opts
>>
>> Turns out that the --drb flag is the culprit.
>
> I don't understand how --drb is r
14 matches
Mail list logo