<<2010-02-07 2010-02-09>>
    Feb 08 00:15
    vesan joined #rspec
    Feb 08 00:58
    malesca joined #rspec
    Feb 08 01:09
    blaxter joined #rspec
    Feb 08 02:06
    ashley_moran joined #rspec
    tvw joined #rspec
    Feb 08 02:22
    chrismcg joined #rspec
    Feb 08 02:32
    josephwilk joined #rspec
    Feb 08 02:38
    malesca left #rspec
    Feb 08 03:10
    jomz joined #rspec
    Feb 08 03:19
    benlovell joined #rspec
    Feb 08 03:24
    chrismcg left #rspec
    Feb 08 04:49
    blaxter joined #rspec
    Feb 08 05:09
    schrd left #rspec
    Feb 08 05:14
    hoeru joined #rspec
    Feb 08 05:26
    stepheneb joined #rspec
    Feb 08 06:06
    benlovell joined #rspec
    Feb 08 06:21
    benlovell joined #rspec
    Feb 08 06:41
    mattwynne joined #rspec
    Feb 08 07:10
    stepheneb joined #rspec
    Feb 08 07:23
    linoj joined #rspec
    Feb 08 07:35
    jhenderson joined #rspec
    hugod joined #rspec
    Feb 08 08:07
    Fullmoon joined #rspec
    Feb 08 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
    kW_ joined #rspec
    Feb 08 08:30
    bdimcheff joined #rspec
    scottmotte joined #rspec
    Feb 08 08:36
    emmanueloga joined #rspec
    emmanuel_oga joined #rspec
    Feb 08 08:50
    rsl
    should raise?
    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.
    dfr|work joined #rspec
    Feb 08 08:56
    charleyb joined #rspec
    dfr|work joined #rspec
    Feb 08 09:06
    altogether joined #rspec
    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
    rsl
    i understand. just saying that yr testing that you know how to write routes rather than behavior. different strokes for different folks though.
    but like i said... use should raise
    Feb 08 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
    vesan joined #rspec
    rsl
    i thought you wanted to test the route raises routing error.
    lambda { delete :destroy ... }.should raise ... [air code]
    Feb 08 09:17
    jamuraa
    I did, I moved on.
    Feb 08 09:26
    Fullmoon joined #rspec
    Feb 08 09:32
    hoeru joined #rspec
    Feb 08 09:37
    rds joined #rspec
    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?
    Feb 08 09:45
    scottmotte joined #rspec
    malesca joined #rspec
    Feb 08 09:59
    technicalpickles joined #rspec
    bdimcheff_ joined #rspec
    Feb 08 10:11
    kW joined #rspec
    towski joined #rspec
    Feb 08 10:40
    eadz joined #rspec
    Feb 08 10:58
    raidfive joined #rspec
    Feb 08 11:10
    patmaddox joined #rspec
    tvw joined #rspec
    Feb 08 11:26
    ashley_moran joined #rspec
    Feb 08 11:41
    mabes joined #rspec
    Feb 08 11:54
    fakingfantastic joined #rspec
    leitgebj joined #rspec
    Feb 08 12:03
    ssmithstone joined #rspec
    s_dana joined #rspec
    Feb 08 12:10
    emmanueloga joined #rspec
    Feb 08 12:16
    jomz joined #rspec
    amerine joined #rspec
    Feb 08 12:26
    rds joined #rspec
    Feb 08 12:47
    werdnativ joined #rspec
    josephwilk joined #rspec
    Feb 08 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?
    ashley_moran
    phinze: you can put in in a module, then do config.include in the spec_helper block
    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?
    ashley_moran
    oh, no it won't - i misunderstood you
    phinze
    yeah sorry should have explained better up front
    ashley_moran
    in that case you can put it in a module and do `module Kernel; include MyModule; end`
    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 :)
    i suppose i could just ensure it's in scope and call it as MyModule.require_special('foo')
    alright well thanks for the info ashley_moran
    ashley_moran
    phinze: well now i've said that I can't make it work myself :)
    Feb 08 13:00
    ashley_moran
    let me go and learn how to actually program, back in 2 secs :)
    technicalpickles
    phinze: fyi, I think files in spec/support/*.rb are automatically loaded
    bronson_ joined #rspec
    phinze
    technicalpickles: ORLY -- i have Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f} in my spec_helper.rb
    so perhaps i can experiment with removing that :P
    technicalpickles
    it might be a more recent version
    * ashley_moran
    has clearly forgotten how include works
    bronson joined #rspec
    technicalpickles
    ashley_moran: can you even include a module in a module?
    nevermind, you definitely can
    ashley_moran
    technicalpickles: apparently, and i'm sure i've done it before, but i can't make it produce any useful behaviour :)
    technicalpickles
    could always look at how rspec itself adds 'describe' to the top level
    Feb 08 13:06
    phinze
    technicalpickles: not a bad idea
    ashley_moran
    go on... someone enlighten me :) http://gist.github.com/298526
    is it sleep deprivation or have i just forgotten how ruby works?
    technicalpickles
    ashley_moran: rspec just re-opens kernel itself
    ashley_moran
    technicalpickles: so it does
    i usually prefer to put things in their own namespace, but i can see why they do it that now way...
    i must have imagined including a module into Kernel before
    malesca left #rspec
    technicalpickles
    ashley_moran: sometimes people add it to Object
    Feb 08 13:12
    phinze
    ashley_moran: yeah that is odd (your gist)
    but yes if you do class Object; include MyModule; end it works
    stepheneb joined #rspec
    bcardarella joined #rspec
    ashley_moran
    Feb 08 13:19
    josephwi_ joined #rspec
    Feb 08 13:26
    Licenser_ joined #rspec
    hugod joined #rspec
    Feb 08 13:45
    bcardarella joined #rspec
    Feb 08 13:52
    agilezencd joined #rspec
    bcardarella joined #rspec
    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">
    charlenopires joined #rspec
    agilezencd
    actual.should eql(expected)
    technicalpickles
    unsaved records are generally != iirc
    agilezencd
    If I don't want to persist them in my tests - how can I make this test pass?
    technicalpickles
    it's hard to say w/o knowing what it is that is being tested
    Feb 08 13:58
    agilezencd
    OK, I got your point. Thanks a lot technicapickles!
    technicalpickles
    maybe you need to set expections a different way?
    agilezencd
    yeah, in this case I can just narrow my assert to one attribute
    Feb 08 14:03
    rsl
    or mebbe @foo.attributes.should == @bar.attributes if yr really wanting to assert on all of them?
    Feb 08 14:09
    agilezencd
    I'll try. Thanks
    Feb 08 14:17
    altogether joined #rspec
    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?
    Feb 08 15:11
    Licenser joined #rspec
    stef_ joined #rspec
    Feb 08 15:29
    beilabs joined #rspec
    Feb 08 15:35
    hgimenez joined #rspec
    Feb 08 15:42
    scottmotte joined #rspec
    Feb 08 15:56
    stepheneb joined #rspec
    hgimenez joined #rspec
    stepheneb joined #rspec
    Feb 08 16:21
    scott_NZ joined #rspec
    Feb 08 16:30
    vesan joined #rspec
    romanandreg joined #rspec
    romanandreg
    guys, quick question
    is there a way to use a middleware in Rails Controller tests?
    ¿?
    Feb 08 16:35
    romanandreg left #rspec
    romanandreg joined #rspec
    Feb 08 16:43
    romanandreg
    guys, I'm having issues with rSpec and Warden (a middleware for authentication)
    it seems rSpec is not loading the middleware on purpose
    so one quarter of my tests started to fail, after moving to Warden
    :-(
    Feb 08 17:04
    Adkron joined #rspec
    enherit joined #rspec
    Feb 08 17:26
    scottmotte joined #rspec
    hgimenez joined #rspec
    Feb 08 17:49
    technicalpickles joined #rspec
    technicalpickles joined #rspec
    Feb 08 17:54
    mabes joined #rspec
    Feb 08 18:05
    GitHub81 joined #rspec
    GitHub81
    rspec-rails: master alex rothenberg * 9c5a908 (2 files in 2 dirs): helper instance variable no longer persists across examples ...
    rspec-rails: master David Chelimsky * ec2cd94 (1 files in 1 dirs): words
    rspec-rails: master commits 2bd7552...ec2cd94 - http://bit.ly/dxeP4V
    GitHub81 left #rspec
    Feb 08 18:11
    GitHub60 joined #rspec
    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
    GitHub60 left #rspec
    Feb 08 18:21
    bcardarella joined #rspec
    Feb 08 18:43
    mnoble joined #rspec
    mnoble joined #rspec
    Feb 08 18:56
    urbanmonk joined #rspec
    Feb 08 19:06
    raidfive joined #rspec
    Feb 08 19:39
    hugod joined #rspec
    Feb 08 19:47
    patmaddox joined #rspec
    cmarques joined #rspec
    Feb 08 20:27
    bakineggs joined #rspec
    Feb 08 20:50
    amerine joined #rspec
    Feb 08 21:26
    BrianTheCoder joined #rspec
    bronson joined #rspec
    bcardarella joined #rspec
    Feb 08 21:36
    RobotDeathSquad joined #rspec
    Feb 08 21:44
    anathematic joined #rspec
    Feb 08 22:17
    towski joined #rspec
    Feb 08 22:30
    stef_ joined #rspec
    mabes joined #rspec
    GitHub166 joined #rspec
    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]
    rspec: master David Chelimsky * 10e3836 (1 files in 1 dirs): words
    rspec: master commits aead98b...10e3836 - http://bit.ly/crjx4O
    GitHub166 left #rspec