<  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:29 eadz joined
00:55 stepheneb joined
01:08 blaxter joined
01:12 blax joined
01:35 eadz joined
02:11 magpieuk1 joined
02:20 ashley_moran joined
02:31 jomz joined
02:36 imajes joined
02:41 mattwynne joined
02:43 benlovell joined
03:00 magpieuk joined
03:01 BrianTheCoder_ joined
03:04 rds joined
03:10 jhenderson joined
03:20 jschoolcraft joined
03:20 scott_NZ joined
03:20 scott_NZ joined
03:39 tvw joined
03:42 benlovell joined
04:41 Fullmoon joined
04:49 benlovell joined
06:16 charlenopires joined
06:51 s_dana joined
06:53 snusnu joined
07:49 bronson joined
07:57 rsl joined
07:58 rsl joined
08:14 charlenopires joined
08:21 technicalpickles joined
08:21 technicalpickles joined
08:33 agib joined
09:16 mabes joined
09:22 scottmotte joined
09:28 agile joined
09:42 snusnu joined
09:50 banksy34 joined
09:50 <banksy34> hello all
09:50 <banksy34> i have a bug to report for rspec
09:50 <banksy34> is this the best place to do it?
10:01 altogether joined
10:02 charlenopires joined
10:03 goatish_mound joined
10:03 goatish_mound joined
10:06 <banksy34> anyone?
10:07 patmaddox joined
10:10 balint joined
10:28 charlenopires joined
10:29 <goatish_mound> banksy34: i believe there's a lighthouse project setup for bug reporting and patch submission.
10:31 <banksy34> hmm
10:31 <banksy34> i just don't really want to create an account
10:31 <banksy34> the issue is that autospec fails when there is a space in the path of your project directory
10:31 <banksy34> not that big of an iisue
10:31 <banksy34> I just fixed it by removing the space
10:38 technicalpickles joined
10:38 technicalpickles joined
10:41 eadz joined
11:10 eadz joined
11:10 <phinze> hmm rspec-rails question: is there a nice way of saying it ('creates a foo model') { MyModel.find_by_name('foo').should_not be_nil }
11:11 <phinze> i sort of want an ARish model.should exist i guess
11:13 <phinze> from googling i'm guessing that `find_by_foo(...).should_not be_nil` is the best we got for now... if anyone has a better way please do ping me :)
11:20 Fullmoon joined
11:21 raidfive joined
11:24 <technicalpickles> phinze: there's an exists? method on AR::Base
11:24 <phinze> technicalpickles: right, but how to call that rspec-ily
11:25 <phinze> MyModel.exists?(:name => 'foo').should be_true ... ?
11:25 <technicalpickles> MyModel.should exist(:name => 'foo')
11:25 <technicalpickles> there's magic to translate question-mark methods into matchers
11:25 <phinze> aha! giving that a shot, didn't know it de-pluralized
11:25 <technicalpickles> I think it's clever
11:25 <technicalpickles> rspec, that is, to do that
11:26 <technicalpickles> you could also implement a exist method, that does what you want, and gives you a good error message
11:26 <technicalpickles> that particular one will probably fail with 'expected true, but was false'
11:26 <technicalpickles> for example
11:26 <phinze> ah gotchya
11:26 <phinze> playing around with the more recent implicit subject features today
11:26 <phinze> liking it a lot actually
11:28 <phinze> though the cleverness+concision vs. kiss debate always rages on in my head ;)
11:30 linoj joined
11:31 <phinze> hmm i think i'm running into the actual should exist method
11:31 <phinze> http://rspec.rubyforge.org/rspec/1.3.0/classes/Spec/Matchers.html#M000172
11:35 s_dana joined
11:36 <technicalpickles> possibly...
11:39 <phinze> messing with it a bit, will let you know
11:52 <phinze> hmm.. i found the magic in the BePredicate matcher
11:53 danhealy joined
11:53 <phinze> MyModel.should be_exist(:name => 'foo') works
11:53 <phinze> isn't the be_* required to activate the magic?
11:55 <danhealy> I have autospec working on an old project. I just set up a new rails project for autospec but it doesn't work, I just get a ----- line and no specs run. it gives me a new ---- line if I save a file though
11:55 <danhealy> I have only done this a few times, what am I missing?
11:56 <danhealy> spec_helper.rb, spec.opts, .autotest, config/environments all look ok
11:57 <phinze> technicalpickles: http://gist.github.com/299522
12:00 <technicalpickles> danhealy: autotest was split up into a few gems... make sure you have autotest-rails installed
12:00 <technicalpickles> phinze: no clue dude...
12:01 <danhealy> I have autotest-rails (4.1.0), autotest (4.2.5, 4.2.4), autotest-fsevent (0.2.1, 0.2.0, 0.1.3)
12:01 <danhealy> does that need to be in the environments?
12:02 <danhealy> I just have config.gem for rspec, rspec-rails and webrat
12:05 <danhealy> hmm I ran it with -v and I get "No tests matched" for a bunch of files, eg No tests matched spec/spec_helper.rb
12:09 <danhealy> when I run autospec -v in my old project, i get that too, but then it does the normal thing of running ruby spec --autospec <bunch of files> -0 spec/spec.opts
12:09 <danhealy> in the new project it just doesnt do that at all
12:10 <danhealy> -O i guess
12:10 <danhealy> and it works if I run it manually on a file
12:16 bcardarella joined
12:28 BrianTheCoder joined
12:51 werdnativ joined
12:53 josephwilk joined
12:57 anathematic joined
13:27 bcardarella joined
13:30 <phinze> garg, i have a very expensive `before :all` that i want to run "once before this and all sub example groups" but it's running "once for this and once _again_ for each sub example group"
13:30 <phinze> but i don't want before :suite -- that's too global
13:34 <phinze> i guess friendly before :all + implicit subjectness aren't going to play nice
13:35 snusnu joined
13:35 <phinze> this is what i get for trying to play fancy instead of safe :P
13:36 Licenser joined
13:55 snusnu left
13:57 technicalpickles joined
13:57 technicalpickles joined
14:13 bcardarella joined
14:14 altogether joined
14:24 has_rb joined
14:30 bronson joined
14:57 WALoeIII joined
14:58 locks joined
15:12 linoj joined
15:16 benlovell joined
15:44 stef_ joined
16:03 linoj joined
16:17 linoj joined
16:23 scottmotte joined
16:31 has_rb joined
16:31 bronson joined
16:32 mnoble joined
16:38 scottmotte joined
16:39 has_rb_ joined
16:57 hgimenez joined
17:05 scottmotte joined
17:06 raidfive joined
17:17 scottmotte joined
17:19 technicalpickles joined
17:19 technicalpickles joined
17:25 bcardarella joined
17:28 scottmotte joined
17:38 scottmotte joined
17:53 eadz joined
17:53 eadz joined
17:58 Adkron joined
18:17 scottmotte joined
18:18 Licenser joined
18:22 imajes joined
18:23 imajes joined
18:24 imajes joined
18:25 imajes joined
19:01 bakineggs joined
19:14 patmaddox joined
19:17 foca_ joined
19:33 bronson joined
19:55 agib joined
19:59 mabes joined
19:59 stef_ joined
20:30 agile joined
20:32 altogether joined
20:50 mabes joined
21:01 WALoeIII joined
21:12 stef_ joined
21:27 has_rb joined
21:29 bcardarella joined
21:35 eadz joined
21:36 <eadz> when testing a view, is the layout rendered as well?
21:36 <eadz> and is there a way to print the code in the console that the view spec is matching against?
21:38 anathematic joined
21:52 <stef_> if using webrat you can print last_response after a visit
22:08 amerine joined
22:09 malesca joined
22:54 bcardarella joined
23:10 patmaddox joined
23:38 scottmotte joined
23:39 scottmotte_ joined