On 8/28/07, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On 8/14/07, sbellware <[EMAIL PROTECTED]> wrote:
> >
> > Folks,
> >
> > I'd like to spec the behaviors that I'm adding to ApplicationController.
> > Specifically, I'm adding:
> >
> > def authenticated?
> > session[:username] != nil
> > end
On Aug 27, 2007, at 12:52 PM, J.D. Hollis wrote:
> I just switched our project over to Edge Rails, and I'm running into
> this problem with all of my helper methods that call _url methods:
>
> NoMethodError in 'ApplicationHelper home_link should generate a valid
> home link when User.current and
On 8/14/07, sbellware <[EMAIL PROTECTED]> wrote:
>
> Folks,
>
> I'd like to spec the behaviors that I'm adding to ApplicationController.
> Specifically, I'm adding:
>
> def authenticated?
> session[:username] != nil
> end
>
> I described ApplicationController, but couldn't figure out how to call
Folks,
I'd like to spec the behaviors that I'm adding to ApplicationController.
Specifically, I'm adding:
def authenticated?
session[:username] != nil
end
I described ApplicationController, but couldn't figure out how to call the
authenticated method. I'm probably going about this quite wro
J.D. Hollis wrote:
> I just switched our project over to Edge Rails, and I'm running into
> this problem with all of my helper methods that call _url methods:
Check out the patch at:
http://rubyforge.org/tracker/index.php?func=detail&aid=13186&group_id=797&atid=3151
Jay
__
I just switched our project over to Edge Rails, and I'm running into
this problem with all of my helper methods that call _url methods:
NoMethodError in 'ApplicationHelper home_link should generate a valid
home link when User.current and Profile.current is not set'
You have a nil object when y
Jim Deville wrote:
>>
>
> Just wondering about your usage of constraints. We ran into this
> issue recently and came to the conclusion that unless profiling shows
> an issue, use AR to enforce referential integrity. You might be able
> to get by using :dependent => :destroy, or one of the o
On 8/27/07, Courtenay <[EMAIL PROTECTED]> wrote:
> You create the records.
I guess that I need to hit the database to really test if the method
is working at all.
In fact what I must test is the SQL query itself.
Thanks.
>
> @bah = Bah.create!
> [1, 5, 22, 16].each { |amount| Foo.create! :am
You create the records.
@bah = Bah.create!
[1, 5, 22, 16].each { |amount| Foo.create! :amount => amount, :bah => @bah }
@bah.foos.should == 44
On 8/27/07, Rodrigo Alvarez Fernández <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to know how would you test a method in a model that uses
>
Hi,
I would like to know how would you test a method in a model that uses
complex a SQL query that joins several tables in order to make a
calculation.
I suppose that I need fixtures, although my approach with rspec is to
avoid fixtures and isolate model specs, but none of both seems
possible in
David Chelimsky wrote:
> On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
>> Tilmann Singer wrote:
>>> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
>>>> What's rake doing differently?
>>> rake spec isn't doing anything fundamental
his code with
rpsec but since rspec uses rails Fixtures class (right?) you should be
able to use this as well.
-Ben
Jim Deville wrote:
> On Aug 27, 2007, at 8:08 AM, David Chelimsky wrote:
>
>
>> On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
>>
>>>
On Aug 27, 2007, at 8:08 AM, David Chelimsky wrote:
> On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
>> Tilmann Singer wrote:
>>> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
>>>> What's rake doing differently?
>>>
>>>
On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
> Tilmann Singer wrote:
> > * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
> >> What's rake doing differently?
> >
> > rake spec isn't doing anything fundamentally different, but the order
Tilmann Singer wrote:
> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
>> What's rake doing differently?
>
> rake spec isn't doing anything fundamentally different, but the order
> the specs are run is propably randomly different from when you run
> the
* Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
> I've got a spec that loads a fixture in the "before" block. This works
> fine running scripts/spec, but when I run rake spec instead, I get:
>
> ActiveRecord::StatementInvalid in 'User in fixture :quenti
El 27/8/2007, a las 6:00, Steven R. Baker escribió:
> Ben Mabey wrote:
>> Hey all,
>> Has any one ever tested or try to test c code with rspec? I am using
>> system calls to my compiled c program and testing against the
>> standard
>> output but I would like to get a lot more granular than this
17 matches
Mail list logo