On 22-jul-2008, at 6:43, Teedub wrote:
Thanks
rake db:test:prepare did the trick. I am still a bit confused as to
why rake cares about a database that it isn't using.
But I guess that will all fall into place in my brain one day.
Well, the test database is for ehrm, testing :). So rake is act
On Mon, Jul 21, 2008 at 8:34 PM, Mark Wilden <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 21, 2008 at 4:33 PM, Macario Ortega <[EMAIL PROTECTED]>
> wrote:
>
>>
>> I have a spec for a model that passes all tests if I run it using
>> textmate but I run rake some of the otherwise passed tests fail.
>>
>
So lastnight I was writing a fake controller to test some before filter action.
I found myself writing this line of code that I thought was funny ... maybe its
a subtle indication i've been programming to much lately.
get :some_action
HA!
_
On Tue, Jul 22, 2008 at 11:26 AM, Britt Mileshosky
<[EMAIL PROTECTED]> wrote:
>
> So lastnight I was writing a fake controller to test some before filter
> action.
> I found myself writing this line of code that I thought was funny ... maybe
> its
> a subtle indication i've been programming to mu
Mark Wilden wrote:
> On Mon, Jul 21, 2008 at 4:33 PM, Macario Ortega <[EMAIL PROTECTED]>
> wrote:
>
>>
>> I have a spec for a model that passes all tests if I run it using
>> textmate but I run rake some of the otherwise passed tests fail.
>>
>
> AFAIK, the main difference is that rake copies the
On Tue, Jul 22, 2008 at 1:56 PM, Macario Ortega <[EMAIL PROTECTED]> wrote:
>
> Well I don't trust autotest because the same tests pass when i run them
> from textmate and they fail when I run autotest.
>
> The dubbious specs are all for a specific model but some of them are
> very basic such as tes
Hello, I am learning rspec/rspec-rails and ruby on rails.
Controller:
class IssuesController < ApplicationController
def index
end
def new
@issue = Issue.new
end
def create
@issue = Issue.new
The "should_receive" should appear before the "post :create" (look at
this for a better explanation ->
http://rubyforge.org/pipermail/rspec-users/2008-June/007342.html )
it 'should not save the issue' do
@issue = mock_model(Issue)
@issue
thanks Maurício, I read your link. It worked.
2008/7/23 Maurício Linhares <[EMAIL PROTECTED]>:
> The "should_receive" should appear before the "post :create" (look at
> this for a better explanation ->
> http://rubyforge.org/pipermail/rspec-users/2008-June/007342.html )
>
> it 'shoul
Im having a hard time with a rspec controller test im writting, I need
to stub! the User.find call twice once to return the owning user and
once to return the viewing user. however when I attempt
User.stub!(:find).with(1).and_return(@user)
User.stub!(:find).with(2).and_return(@user2)
the second c
Have you tried using should_receive instead of stub! ?
Sent from my iPhone
On 22-Jul-08, at 8:37 PM, Ry An <[EMAIL PROTECTED]> wrote:
Im having a hard time with a rspec controller test im writting, I need
to stub! the User.find call twice once to return the owning user and
once to return the v
2008-07-23 04:37, Ry An:
> User.stub!(:find).with(1).and_return(@user)
> User.stub!(:find).with(2).and_return(@user2)
>
> the second call returns
> undefined local variable or method `find' for
> #
This is a kludge, but you might be able to work around your situation
using
User.stub!(:find).an
On Tue, Jul 22, 2008 at 9:37 PM, Ry An <[EMAIL PROTECTED]> wrote:
> Im having a hard time with a rspec controller test im writting, I need
> to stub! the User.find call twice once to return the owning user and
> once to return the viewing user. however when I attempt
>
> User.stub!(:find).with(1).a
13 matches
Mail list logo