<  February 2010   >
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28
00:15 vesan joined
00:58 malesca joined
01:09 blaxter joined
02:06 ashley_moran joined
02:10 tvw joined
02:22 chrismcg joined
02:32 josephwilk joined
02:38 malesca left
03:10 jomz joined
03:19 benlovell joined
03:24 chrismcg left
04:49 blaxter joined
05:09 schrd left
05:14 hoeru joined
05:26 stepheneb joined
06:06 benlovell joined
06:21 benlovell joined
06:41 mattwynne joined
07:10 stepheneb joined
07:23 linoj joined
07:35 jhenderson joined
07:38 hugod joined
08:07 Fullmoon joined
08:13 <jamuraa> how would I test that a route doesn't exist? for example, I want to be sure that I don't have a :destroy route
08:17 kW_ joined
08:30 bdimcheff joined
08:30 scottmotte joined
08:36 emmanueloga joined
08:36 emmanuel_oga joined
08:50 <rsl> should raise?
08:50 <rsl> i never test routing though. imo that's like testing that AR::Base.find does what it should. but i know lots of ppl who do test it.
08:53 dfr|work joined
08:56 charleyb joined
08:59 dfr|work joined
09:06 altogether joined
09:06 <jamuraa> rsl: I guess I just want to make sure a :destroy route doesn't appear, letting things be destroyed that shouldn't be allowed to be destroyed
09:07 <rsl> i understand. just saying that yr testing that you know how to write routes rather than behavior. different strokes for different folks though.
09:07 <rsl> but like i said... use should raise
09:12 <jamuraa> hmm, my assigns[:var] doesn't seem to be working right. if I p @thing in my controller, but if I put p assigns[:thing] in my test right after, it is nil
09:15 vesan joined
09:15 <rsl> i thought you wanted to test the route raises routing error.
09:16 <rsl> lambda { delete :destroy ... }.should raise ... [air code]
09:17 <jamuraa> I did, I moved on.
09:26 Fullmoon joined
09:32 hoeru joined
09:37 rds joined
09:41 <kW_> Hello! Does anybody use rspec for verification? That is: not some software is tested, but some data structure is ensured that it conforms to certain restrictions?
09:45 scottmotte joined
09:49 malesca joined
09:59 technicalpickles joined
10:02 bdimcheff_ joined
10:11 kW joined
10:15 towski joined
10:40 eadz joined
10:58 raidfive joined
11:10 patmaddox joined
11:13 tvw joined
11:26 ashley_moran joined
11:41 mabes joined
11:54 fakingfantastic joined
11:55 leitgebj joined
12:03 ssmithstone joined
12:05 s_dana joined
12:10 emmanueloga joined
12:16 jomz joined
12:18 amerine joined
12:26 rds joined
12:47 werdnativ joined
12:49 josephwilk joined
12:55 <phinze> hey folks, where is the best place to put a special require helper method i'm going to use in my specs, i assume that def require_special(filename); ... ; end in spec_helper is not ideal?
12:56 <ashley_moran> phinze: you can put in in a module, then do config.include in the spec_helper block
12:57 <phinze> ashley_moran: will that be available at the top level of spec files so i can put require_special next to my regular requires?
12:57 <ashley_moran> oh, no it won't - i misunderstood you
12:57 <phinze> yeah sorry should have explained better up front
12:58 <ashley_moran> in that case you can put it in a module and do `module Kernel; include MyModule; end`
12:58 <phinze> ah okay, so specs execute in Kernel context... i'm hesitant to add to that. i'm probably already gold-plating my current task anyways, so i can just move along :)
12:59 <phinze> i suppose i could just ensure it's in scope and call it as MyModule.require_special('foo')
12:59 <phinze> alright well thanks for the info ashley_moran
13:00 <ashley_moran> phinze: well now i've said that I can't make it work myself :)
13:00 <ashley_moran> let me go and learn how to actually program, back in 2 secs :)
13:01 <technicalpickles> phinze: fyi, I think files in spec/support/*.rb are automatically loaded
13:01 bronson_ joined
13:02 <phinze> technicalpickles: ORLY -- i have Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f} in my spec_helper.rb
13:02 <phinze> so perhaps i can experiment with removing that :P
13:02 <technicalpickles> it might be a more recent version
13:02 <* ashley_moran> has clearly forgotten how include works
13:03 bronson joined
13:03 <technicalpickles> ashley_moran: can you even include a module in a module?
13:04 <technicalpickles> nevermind, you definitely can
13:04 <ashley_moran> technicalpickles: apparently, and i'm sure i've done it before, but i can't make it produce any useful behaviour :)
13:04 <technicalpickles> could always look at how rspec itself adds 'describe' to the top level
13:06 <phinze> technicalpickles: not a bad idea
13:07 <ashley_moran> go on... someone enlighten me :) http://gist.github.com/298526
13:07 <ashley_moran> is it sleep deprivation or have i just forgotten how ruby works?
13:09 <technicalpickles> ashley_moran: rspec just re-opens kernel itself
13:10 <ashley_moran> technicalpickles: so it does
13:10 <ashley_moran> i usually prefer to put things in their own namespace, but i can see why they do it that now way...
13:10 <ashley_moran> i must have imagined including a module into Kernel before
13:11 malesca left
13:11 <technicalpickles> ashley_moran: sometimes people add it to Object
13:12 <phinze> ashley_moran: yeah that is odd (your gist)
13:13 <phinze> but yes if you do class Object; include MyModule; end it works
13:13 stepheneb joined
13:16 bcardarella joined
13:16 <ashley_moran> aha, cracked it: http://gist.github.com/298526
13:19 josephwi_ joined
13:26 Licenser_ joined
13:30 hugod joined
13:45 bcardarella joined
13:52 agilezencd joined
13:52 bcardarella joined
13:53 <agilezencd> Can anyone give me an advice about this failed asser? expected #<ScheduledFlashcard id: nil, flashcard_id: 1, execute_at: "2010-02-08 20:57:03"> got #<ScheduledFlashcard id: nil, flashcard_id: 1, execute_at: "2010-02-08 20:57:03">
13:53 charlenopires joined
13:54 <agilezencd> actual.should eql(expected)
13:54 <technicalpickles> unsaved records are generally != iirc
13:54 <agilezencd> If I don't want to persist them in my tests - how can I make this test pass?
13:56 <technicalpickles> it's hard to say w/o knowing what it is that is being tested
13:58 <agilezencd> OK, I got your point. Thanks a lot technicapickles!
13:59 <technicalpickles> maybe you need to set expections a different way?
14:00 <agilezencd> yeah, in this case I can just narrow my assert to one attribute
14:03 <rsl> or mebbe @foo.attributes.should == @bar.attributes if yr really wanting to assert on all of them?
14:09 <agilezencd> I'll try. Thanks
14:17 altogether joined
14:20 <tvw> I am just writing a spec for a controller. By moving all repeating code into a before(:each)-block, I noticed, that one test got empty. Is this ok?
15:11 Licenser joined
15:15 stef_ joined
15:29 beilabs joined
15:35 hgimenez joined
15:42 scottmotte joined
15:56 stepheneb joined
15:57 hgimenez joined
16:00 stepheneb joined
16:21 scott_NZ joined
16:30 vesan joined
16:34 romanandreg joined
16:34 <romanandreg> guys, quick question
16:34 <romanandreg> is there a way to use a middleware in Rails Controller tests?
16:35 <romanandreg> ¿?
16:35 romanandreg left
16:37 romanandreg joined
16:43 <romanandreg> guys, I'm having issues with rSpec and Warden (a middleware for authentication)
16:43 <romanandreg> it seems rSpec is not loading the middleware on purpose
16:44 <romanandreg> so one quarter of my tests started to fail, after moving to Warden
16:44 <romanandreg> :-(
17:04 Adkron joined
17:06 enherit joined
17:26 scottmotte joined
17:27 hgimenez joined
17:49 technicalpickles joined
17:49 technicalpickles joined
17:54 mabes joined
18:05 GitHub81 joined
18:05 <GitHub81> rspec-rails: master alex rothenberg * 9c5a908 (2 files in 2 dirs): helper instance variable no longer persists across examples ...
18:05 <GitHub81> rspec-rails: master David Chelimsky * ec2cd94 (1 files in 1 dirs): words
18:05 <GitHub81> rspec-rails: master commits 2bd7552...ec2cd94 - http://bit.ly/dxeP4V
18:05 GitHub81 left
18:11 GitHub60 joined
18:11 <GitHub60> rspec-rails: master David Chelimsky * 2a51fba (1 files in 1 dirs): memoize the helper in the example instead of in the group - http://bit.ly/c6shJE
18:11 GitHub60 left
18:21 bcardarella joined
18:43 mnoble joined
18:44 mnoble joined
18:56 urbanmonk joined
19:06 raidfive joined
19:39 hugod joined
19:47 patmaddox joined
19:49 cmarques joined
20:27 bakineggs joined
20:50 amerine joined
21:26 BrianTheCoder joined
21:29 bronson joined
21:30 bcardarella joined
21:36 RobotDeathSquad joined
21:44 anathematic joined
22:17 towski joined
22:30 stef_ joined
22:31 mabes joined
22:32 GitHub166 joined
22:32 <GitHub166> rspec: master Scott Taylor * 2753b49 (2 files in 2 dirs): Fix delegation of stubbed values on superclass class-level methods. Closes LH[#957 state:resolved], LH[#496 state:resolved]
22:32 <GitHub166> rspec: master David Chelimsky * 10e3836 (1 files in 1 dirs): words
22:32 <GitHub166> rspec: master commits aead98b...10e3836 - http://bit.ly/crjx4O
22:32 GitHub166 left
22:56 snusnu joined
23:00 scottmotte joined
23:01 scottmotte joined
23:01 tvw joined
23:06 scottmotte joined
23:29 bcardarella joined
23:30 altogether joined