<    March 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 29 30 31
00:24 jxson joined
00:49 pietia joined
00:49 danhealy joined
00:57 ashley_moran joined
00:59 danhealy joined
01:00 jxie joined
01:09 blaxter joined
01:38 malesca joined
01:41 tvw joined
02:22 BobFunk joined
02:33 robholland joined
02:33 robholland joined
02:34 josephwilk joined
02:37 TomV-415 joined
02:40 jhenderson joined
03:35 robholland joined
03:35 robholland joined
03:54 textarcana joined
04:08 robholland joined
04:08 robholland joined
04:32 jschoolcraft joined
04:48 fermion joined
05:21 rsl joined
05:40 hgimenez joined
05:47 josephwilk joined
05:51 rds joined
06:38 jxie joined
06:47 josephwi_ joined
07:14 textarcana_ joined
07:15 robholland joined
07:15 robholland joined
07:29 bronson joined
07:30 jomz joined
07:39 <technicalpickles> foca: the way rspec 1.x does it is pretty hacky. iirc, it has something to do with the directory it's in. fortunately, it's one of the things that rspec 2 is trying to fix
07:49 josephwi_ joined
07:55 mabes joined
08:01 s_dana joined
08:02 stepheneb joined
08:05 nevans joined
08:16 dfr|work joined
08:24 bcardarella joined
08:30 robholland joined
08:30 robholland joined
08:31 <rsl> i need to set request.host in an rspec/webrat integration test but google coming up short on help for this. anyone know how it's done?
08:31 <rsl> i'd rather not append hostname to every visit call.
08:32 <rsl> though i think i read that would work.
08:32 <malesca> rsl: I have this in a cucumber step definition: host! domain
08:32 <malesca> not sure exactly how that'd translate to rspec with webrat
08:32 <rsl> malesca: yeah i saw that and tried it but it doesn't seem to do anything.
08:33 <rsl> session and request are both nil objects in the before block where i'm setting this.
08:33 josephwi_ joined
08:34 <malesca> rsl: ah, yeah, seems you should do session.host!("www.example.com"), so it makes sense that it wouldn't work without a session
08:35 dchelimsky joined
08:35 <rsl> might do something nasty for the moment until i can find the real solution.
08:35 <technicalpickles> I'm pretty sure I've used just 'host! "blahblah.com"' before
08:35 <malesca> there is a url_rewriter_test in Rails that has default_url_options[:host] = 'www.basecamphq.com'
08:35 <technicalpickles> just remember that the World of cucumber tests are a rails integration test
08:36 <technicalpickles> so, if you can find something for setting the host there, it should work in cucumber
08:36 <rsl> technicalpickles: not using cuke. just rspec.
08:36 <technicalpickles> ahh, alright. it's still an ActionController::TestCase :)
08:37 <dchelimsky> rsl: what rails version?
08:37 <technicalpickles> basically all the rspec-rails stuff wrap the appropriate TestCase, so controllers would get ActionController::TestCase, integration tests would get ActionController::IntegrationTest, etc
08:38 <rsl> dchelimsky: rspec 1.2.9 and rails 2.3.5
08:38 <dchelimsky> rsl: first, i'd upgrade to rspec-rails-1.3.2
08:39 <dchelimsky> either way, though, you should be able to set headers on request.env
08:39 <rsl> request is nil though. might be version issue. lemme upgrade and see.
08:41 <dchelimsky> http://github.com/dchelimsky/rspec-rails/blob/master/spec/spec/rails/example/controller_example_group_spec.rb
08:41 <dchelimsky> line 201
08:41 <dchelimsky> http://github.com/dchelimsky/rspec-rails/blob/master/spec/spec/rails/example/controller_example_group_spec.rb#L201
08:41 <dchelimsky> that's a spec for rspec-rails-1.3.2
08:42 <dchelimsky> HTH
08:42 <dchelimsky> rsl: warning ....
08:42 <dchelimsky> you may end up shaving a yak or two upgrading
08:42 <dchelimsky> but it's probably worth it
08:43 <dchelimsky> in fact ....
08:43 <dchelimsky> rails 2.3.5 was released after rspec-rails-1.2.9
08:44 <dchelimsky> definitely good reason to upgrade
08:44 <dchelimsky> :)
08:50 <rsl> hrm upgrade went fine [didn't need to fix any tests] but still getting nil error for request in the before block.
08:50 <rsl> reading in webrat source to see if anything jumps out.
08:54 <rsl> thanks though to everyone so far.
08:56 agile joined
09:15 ivanoats joined
09:16 bdimcheff joined
09:45 imajes joined
10:03 <dchelimsky> rsl: are you using before(:all)?
10:03 <rsl> dchelimsky: no i was using before each
10:03 <dchelimsky> odd
10:03 <rsl> should i try that?
10:03 <dchelimsky> wonder why that spec passes in rspec-rails' own specs
10:03 <rsl> i never got it working though. i ended up setting an instance var for host and overriding visit to prepend the host name from the ivar.
10:03 <rsl> hacky but worked.
10:04 <dchelimsky> glad you got something working
10:04 <rsl> thanks for the help though. yeah it's weird it doesn't work. i see AC::IntegrationTest in the ancestors but a lot of the methods seem to be awol.
10:21 eddanger joined
10:42 amerine joined
11:14 bronson joined
11:14 malesca left
11:15 revans joined
11:26 charlenopires joined
11:29 eddanger joined
11:42 zodiak joined
11:59 dchelimsky joined
12:11 josephwilk joined
12:14 WALoeIII joined
12:18 fpauser joined
12:33 bcardarella joined
12:34 a2ron joined
12:35 lalee joined
12:39 <a2ron> hi guys, i'm trying to use autospec and rspec together to run specs on a rails project. the trouble is, autospec won't run my specs. It just outputs "loading autotest/rails_rspec"
12:39 <a2ron> I can run the specs fine with 'rake spec'
12:45 <a2ron> nvm, figured it out. needed a .autotest file with the correct file. thanks.
12:47 bcardarella joined
12:54 bcardarella joined
12:55 imajes joined
12:56 bdimcheff joined
13:13 bcardarella joined
13:17 Licenser__ joined
13:19 bdimcheff joined
13:32 dchelimsky joined
13:45 patmaddox joined
13:50 patmaddo_ joined
13:56 s_dana joined
13:56 bcardarella joined
14:04 mabes joined
14:12 bcardarella_ joined
14:27 patmaddo_ joined
14:38 josephwil joined
14:44 Licenser__ joined
14:45 adamaig joined
14:50 anlek joined
14:50 <anlek> How can I add a new folder (spec/observers) into the load_path for rspec to see it?
14:59 jomz joined
15:00 BrianTheCoder joined
15:07 <adamaig> anlek: what have you tried?
15:07 <anlek> I tried add_hook, but I just noticed that my ~/.autotest wasn't being read when calling autospec --rails
15:07 <anlek> I tried a lot more, but this is where I'm at now
15:07 charlenopires joined
15:08 <adamaig> hmm i thought that rspec looked for all **/*_spec.rb so simply creating the directory w/ specs works if the directory is under app
15:09 <anlek> when I call 'spec spec', it does. But when autospec calls it, it sends a list of files/folders
15:12 <anlek> adamaig: I was able to figure it out, I pretty much coppeid "/usr/local/lib/ruby/gems/1.8/gems/rspec-rails-1.3.2/lib/autotest/rails_rspec.rb" into my ~/.autotest and tweaked it with my extra folders.
15:18 <adamaig> i see
15:18 <adamaig> seems like that could be globbed better
15:18 patmaddox joined
15:24 dchelimsky joined
15:48 bdimcheff joined
15:53 mabes joined
15:54 WALoeIII joined
15:56 mattwynne joined
15:59 mattwynne joined
16:03 mattwynne joined
16:05 mattwynne joined
16:17 patmaddox joined
16:34 mabes joined
16:55 mabes joined
17:04 patmaddo_ joined
17:06 BrianTheCoder joined
17:15 malkomalko joined
17:28 bdimcheff joined
17:36 agile joined
17:43 malkomalko left
18:12 danhealy joined
18:19 beilabs_ joined
18:22 stepheneb joined
19:13 danhealy joined
19:33 hgimenez joined
19:48 imajes joined
19:54 bakineggs joined
20:07 danhealy joined
20:16 zodiak joined
21:10 patmaddox joined
21:36 danhealy joined
22:37 patmaddox joined
23:17 amerine joined
23:24 bronson joined
23:26 textarcana joined
23:34 hgimenez joined