From aslak.hellesoy at gmail.com Fri Dec 1 12:13:10 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 1 Dec 2006 18:13:10 +0100 Subject: [rspec-devel] RSpec on JRuby on InfoQ Message-ID: <8d961d900612010913j34232925ke40dc0f00afd7e84@mail.gmail.com> http://www.infoq.com/news/2006/11/RSpecOnJRuby From aslak.hellesoy at gmail.com Fri Dec 1 12:49:05 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 1 Dec 2006 18:49:05 +0100 Subject: [rspec-devel] RSpec on JRuby on InfoQ In-Reply-To: <8d961d900612010913j34232925ke40dc0f00afd7e84@mail.gmail.com> References: <8d961d900612010913j34232925ke40dc0f00afd7e84@mail.gmail.com> Message-ID: <8d961d900612010949x50160140i511f5c58bc3dbb9f@mail.gmail.com> And here is the full version: http://on-ruby.blogspot.com/2006/12/jruby-and-rspec-leftovers.html On 12/1/06, aslak hellesoy wrote: > http://www.infoq.com/news/2006/11/RSpecOnJRuby > From bkeepers at gmail.com Fri Dec 1 13:02:18 2006 From: bkeepers at gmail.com (Brandon Keepers) Date: Fri, 1 Dec 2006 13:02:18 -0500 Subject: [rspec-devel] Updated HTML formatter template In-Reply-To: References: <8d961d900611300458v10fa9d76g58cc414970d2a105@mail.gmail.com> <57c63afe0611300517q1f8e9902ib1aa949f32953fdf@mail.gmail.com> Message-ID: <316695BD-AB16-4EFF-AD16-F5190CD9694E@gmail.com> That looks great, Luke! One of the things that I like about the existing HTML template is that it hides the error messages and stack trace for failed specs until you click on them. This is nice if you have several failing specs, or one that spews out a big stack trace. Brandon On Nov 30, 2006, at 10:22 AM, Luke Redpath wrote: > You're right guys I didn't think of this. > > Here's a tweaked design, with failures and a successful run: > > http://uploads.lukeredpath.co.uk/rspec_success.htm > http://uploads.lukeredpath.co.uk/rspec_failed.htm > > Cheers > Luke > > On 30 Nov 2006, at 13:17, David Chelimsky wrote: > >> On 11/30/06, aslak hellesoy wrote: >>> On 11/30/06, Luke Redpath wrote: >>>> I've done a bit of work on the current RSpec HTML formatter >>>> template >>>> - I've changed the stylesheet and played around with the markup a >>>> bit >>>> to make it a bit more semantic (I've opted for definition lists for >>>> the specs). You can view it here: >>>> >>>> http://uploads.lukeredpath.co.uk/rspec.html >>>> >>> >>> Looks great in general but... >>> >>>> It still needs a bit of tweaking, but if nobody has any objections, >>>> I'll roll this into the trunk. >>>> >>> >>> people generally associate red with failure and green with success >>> (at >>> least in the software testing domain). Aren't these colours at odds >>> with the common conventions? My initial reaction was "This is all >>> failures". >>> >> >> Agreed. The feel is very nice but the red does imply failure. >> >> Also - I think that w/ hundreds of specs, this page will get quite >> long. I'd like to see something with slightly smaller fonts and less >> space without sacrificing the nice look. One can wish, right? >> >> Thanks Luke, >> David >> >>> Can you show us one that has both passing and failing specs? >>> >>> Cheers, >>> Aslak >>> >>>> Cheers >>>> Luke >>>> _______________________________________________ >>>> rspec-devel mailing list >>>> rspec-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>> >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From aslak.hellesoy at gmail.com Fri Dec 1 13:36:42 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 1 Dec 2006 19:36:42 +0100 Subject: [rspec-devel] --diff broken on trunk In-Reply-To: <8d961d900610210641v1967fa47icc75adfccf0aa24b@mail.gmail.com> References: <8d961d900610210410w13bc60f1j1fdbb68634cf916e@mail.gmail.com> <8d961d900610210641v1967fa47icc75adfccf0aa24b@mail.gmail.com> Message-ID: <8d961d900612011036i54cac8adtceb89e0e572b0b9b@mail.gmail.com> On 10/21/06, aslak hellesoy wrote: > On 10/21/06, aslak hellesoy wrote: > > http://rubyforge.org/tracker/index.php?func=detail&aid=6259&group_id=797&atid=3149 > > > > This is a regression that has been introduced some time since last > > release, and it must be fixed before we make a new release. This is > > apparently not verified, and we need to amend our specs. > > > > Ok, I just fixed this. > Last time I fixed it I did this: svn diff -r 928:929 Now it seems the regression is back again. I'm looking into it. This time I'll make sure to add a spec that stops it from coming back. Aslak > > When it's fixed (I'm not sure what it is yet) I think we should apply > > Lachie's Object diff patch: > > http://rubyforge.org/tracker/index.php?func=detail&aid=6207&group_id=797&atid=3151 > > > > And applied this one too. > > Aslak > From noreply at rubyforge.org Fri Dec 1 17:20:15 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Dec 2006 17:20:15 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7005 ] Diff ironically reporting different results using spec command and rake Message-ID: <20061201222015.72E1652416BA@rubyforge.org> Bugs item #7005, was opened at 2006-12-01 22:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Nobody (None) Summary: Diff ironically reporting different results using spec command and rake Initial Comment: Trunk Rev 1193 Stand in root ======================== rake spec 478 specifications, 0 failures ======================== bin/spec spec 1) 'should == should raise exception with diff when objects are not ==' FAILED "\apple\ should == \cadillac\" should eql "\apple\ should == \cadillac\\nDiff:\n@@ -1,2 +1,2 @@\n-apple\n+cadillac\n" ./spec/spec/runner/formatter/../../../spec_helper.rb:12:in `should_fail_with' ./spec/spec/expectations/should/should_==_spec.rb:12 Finished in 1.156677 seconds 474 specifications, 1 failure (NOTE - fewer specs, more failures) ======================== bin/spec spec -D 474 specifications, 0 failures ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 From bob.cotton at rallydev.com Fri Dec 1 17:24:13 2006 From: bob.cotton at rallydev.com (Bob Cotton) Date: Fri, 01 Dec 2006 15:24:13 -0700 Subject: [rspec-devel] Again, the use case for setup_once Message-ID: Acceptance Testing! So I've read the arguments against setup_once: http://rubyforge.org/pipermail/rspec-devel/2006-May/000082.html I agree that for unit testing you should be using mocks. However, we are testing the real system so mocking is not an option. I would like to have a big hairy setup, with many small-grained specs. The distribution even hints at this with the patch to the selenium and watir tests. It uses @@class_vars as a hack. I'm looking for something more elegant. Even something that's not distributed in the core, but as an extension would be great. Thanks -- Bob Cotton Test Architect -- Rally Software -- rallydev.com http://www.testarchitecture.com/blog From noreply at rubyforge.org Fri Dec 1 17:44:33 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Dec 2006 17:44:33 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7005 ] Diff ironically reporting different results using spec command and rake Message-ID: <20061201224433.5B6845241C1A@rubyforge.org> Bugs item #7005, was opened at 2006-12-01 22:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Nobody (None) Summary: Diff ironically reporting different results using spec command and rake Initial Comment: Trunk Rev 1193 Stand in root ======================== rake spec 478 specifications, 0 failures ======================== bin/spec spec 1) 'should == should raise exception with diff when objects are not ==' FAILED "\apple\ should == \cadillac\" should eql "\apple\ should == \cadillac\\nDiff:\n@@ -1,2 +1,2 @@\n-apple\n+cadillac\n" ./spec/spec/runner/formatter/../../../spec_helper.rb:12:in `should_fail_with' ./spec/spec/expectations/should/should_==_spec.rb:12 Finished in 1.156677 seconds 474 specifications, 1 failure (NOTE - fewer specs, more failures) ======================== bin/spec spec -D 474 specifications, 0 failures ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-01 22:44 Message: OK - turns out the diffing is turned on when running rake spec, but not when running the spec command. I'd like to get the failing spec (when running the spec command) to pass (when running the spec command). I've tried a few things like turning diffing on and off around that spec and it's not working. More to come.... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 From aslak.hellesoy at gmail.com Fri Dec 1 18:13:51 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Sat, 2 Dec 2006 00:13:51 +0100 Subject: [rspec-devel] Again, the use case for setup_once In-Reply-To: References: Message-ID: <8d961d900612011513wc13d0b3v3daf8661de00b1c3@mail.gmail.com> On 12/1/06, Bob Cotton wrote: > > Acceptance Testing! > > So I've read the arguments against setup_once: > http://rubyforge.org/pipermail/rspec-devel/2006-May/000082.html > > I agree that for unit testing you should be using mocks. > > However, we are testing the real system so mocking is not an option. > > I would like to have a big hairy setup, with many small-grained specs. > > The distribution even hints at this with the patch to the selenium and > watir tests. It uses @@class_vars as a hack. > > I'm looking for something more elegant. Even something that's not > distributed in the core, but as an extension would be great. > I agree that the patch for the selenium example might be a little cumbersome. Could you please submit an RFE at RubyForge for this? Cheers, Aslak > Thanks > > -- > Bob Cotton > Test Architect -- Rally Software -- rallydev.com > http://www.testarchitecture.com/blog > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Fri Dec 1 18:20:57 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Dec 2006 18:20:57 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7005 ] Diff ironically reporting different results using spec command and rake Message-ID: <20061201232057.47E835241C13@rubyforge.org> Bugs item #7005, was opened at 2006-12-01 17:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: David Chelimsky (dchelimsky) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Diff ironically reporting different results using spec command and rake Initial Comment: Trunk Rev 1193 Stand in root ======================== rake spec 478 specifications, 0 failures ======================== bin/spec spec 1) 'should == should raise exception with diff when objects are not ==' FAILED "\apple\ should == \cadillac\" should eql "\apple\ should == \cadillac\\nDiff:\n@@ -1,2 +1,2 @@\n-apple\n+cadillac\n" ./spec/spec/runner/formatter/../../../spec_helper.rb:12:in `should_fail_with' ./spec/spec/expectations/should/should_==_spec.rb:12 Finished in 1.156677 seconds 474 specifications, 1 failure (NOTE - fewer specs, more failures) ======================== bin/spec spec -D 474 specifications, 0 failures ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-01 18:20 Message: Try: ruby -Ilib bin/spec spec --diff This will give the same result as rake, which runs the specs with --diff The reason why there are more specs with rake is that it also runs the RSpec.tmbundle specs ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-01 17:44 Message: OK - turns out the diffing is turned on when running rake spec, but not when running the spec command. I'd like to get the failing spec (when running the spec command) to pass (when running the spec command). I've tried a few things like turning diffing on and off around that spec and it's not working. More to come.... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 From noreply at rubyforge.org Fri Dec 1 18:23:40 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 1 Dec 2006 18:23:40 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7005 ] Diff ironically reporting different results using spec command and rake Message-ID: <20061201232340.4F7E05241C13@rubyforge.org> Bugs item #7005, was opened at 2006-12-01 17:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 Category: None Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Diff ironically reporting different results using spec command and rake Initial Comment: Trunk Rev 1193 Stand in root ======================== rake spec 478 specifications, 0 failures ======================== bin/spec spec 1) 'should == should raise exception with diff when objects are not ==' FAILED "\apple\ should == \cadillac\" should eql "\apple\ should == \cadillac\\nDiff:\n@@ -1,2 +1,2 @@\n-apple\n+cadillac\n" ./spec/spec/runner/formatter/../../../spec_helper.rb:12:in `should_fail_with' ./spec/spec/expectations/should/should_==_spec.rb:12 Finished in 1.156677 seconds 474 specifications, 1 failure (NOTE - fewer specs, more failures) ======================== bin/spec spec -D 474 specifications, 0 failures ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-01 18:23 Message: And the reason why bin/spec spec won't work is that you're running off the gem. I just fixed a regression in diffing (which your gem probably had), which is why you got failures even when passing --diff. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-01 18:20 Message: Try: ruby -Ilib bin/spec spec --diff This will give the same result as rake, which runs the specs with --diff The reason why there are more specs with rake is that it also runs the RSpec.tmbundle specs ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-01 17:44 Message: OK - turns out the diffing is turned on when running rake spec, but not when running the spec command. I'd like to get the failing spec (when running the spec command) to pass (when running the spec command). I've tried a few things like turning diffing on and off around that spec and it's not working. More to come.... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 From undees at gmail.com Fri Dec 1 19:10:12 2006 From: undees at gmail.com (Ian Dees) Date: Fri, 1 Dec 2006 16:10:12 -0800 Subject: [rspec-devel] Again, the use case for setup_once Message-ID: Quoth Bob Cotton: > So I've read the arguments against setup_once: > http://rubyforge.org/pipermail/rspec-devel/2006-May/000082.html > > I agree that for unit testing you should be using mocks. > > However, we are testing the real system so mocking is not an option. I've encountered the same need when writing GUI testing scripts. When we're driving a real GUI, we want to know what actually happened! What I did was monkeypatch Spec::Runner::ContextEval::ModuleMethods to add a setup_once method (taking a block and storing that block in an instance variable), and then aliased/wrapped Spec::Runner::Context::InstanceMethods::run to call the setup_once method first. Not super-elegant, but it works. And it doesn't make RSpec more complicated for the vast majority of folks who are using it for unit testing and who therefore are more likely to need mocks than setup_once. When RSpec gets an extension mechanism, I'll be super-interested to see if this patch can be transformed into a proper extension. --Ian Dees From brian.takita at gmail.com Fri Dec 1 20:59:57 2006 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 1 Dec 2006 17:59:57 -0800 Subject: [rspec-devel] Again, the use case for setup_once In-Reply-To: References: Message-ID: <1d7ddd110612011759t1f6bf575g96eef03fe412531a@mail.gmail.com> On 12/1/06, Bob Cotton wrote: > > > Acceptance Testing! > > So I've read the arguments against setup_once: > http://rubyforge.org/pipermail/rspec-devel/2006-May/000082.html > > I agree that for unit testing you should be using mocks. > > However, we are testing the real system so mocking is not an option. > > I would like to have a big hairy setup, with many small-grained specs. > > The distribution even hints at this with the patch to the selenium and > watir tests. It uses @@class_vars as a hack. > > I'm looking for something more elegant. Even something that's not > distributed in the core, but as an extension would be great. I think a couple of callbacks (:before_suite and :after_suite?) in the ContextRunner would fix this. Thanks > > -- > Bob Cotton > Test Architect -- Rally Software -- rallydev.com > http://www.testarchitecture.com/blog > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20061201/03b9f033/attachment.html From bob.cotton at rallydev.com Sat Dec 2 08:10:51 2006 From: bob.cotton at rallydev.com (Bob Cotton) Date: Sat, 02 Dec 2006 06:10:51 -0700 Subject: [rspec-devel] Again, the use case for setup_once In-Reply-To: <8d961d900612011513wc13d0b3v3daf8661de00b1c3@mail.gmail.com> (aslak hellesoy's message of "Sat, 2 Dec 2006 00:13:51 +0100") References: <8d961d900612011513wc13d0b3v3daf8661de00b1c3@mail.gmail.com> Message-ID: Seems there already is: http://rubyforge.org/tracker/index.php?func=detail&aid=5663&group_id=797&atid=3152 Thanks -Bob "aslak hellesoy" writes: > On 12/1/06, Bob Cotton wrote: >> >> Acceptance Testing! >> >> So I've read the arguments against setup_once: >> http://rubyforge.org/pipermail/rspec-devel/2006-May/000082.html >> >> I agree that for unit testing you should be using mocks. >> >> However, we are testing the real system so mocking is not an option. >> >> I would like to have a big hairy setup, with many small-grained specs. >> >> The distribution even hints at this with the patch to the selenium and >> watir tests. It uses @@class_vars as a hack. >> >> I'm looking for something more elegant. Even something that's not >> distributed in the core, but as an extension would be great. >> > > I agree that the patch for the selenium example might be a little cumbersome. > Could you please submit an RFE at RubyForge for this? > > Cheers, > Aslak > >> Thanks >> >> -- >> Bob Cotton >> Test Architect -- Rally Software -- rallydev.com >> http://www.testarchitecture.com/blog >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel -- Bob Cotton Test Architect -- Rally Software -- rallydev.com www.testarchitecture.com/blog From noreply at rubyforge.org Sat Dec 2 10:49:45 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 10:49:45 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7005 ] Diff ironically reporting different results using spec command and rake Message-ID: <20061202154945.2382A5240EB7@rubyforge.org> Bugs item #7005, was opened at 2006-12-01 17:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 Category: None Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Diff ironically reporting different results using spec command and rake Initial Comment: Trunk Rev 1193 Stand in root ======================== rake spec 478 specifications, 0 failures ======================== bin/spec spec 1) 'should == should raise exception with diff when objects are not ==' FAILED "\apple\ should == \cadillac\" should eql "\apple\ should == \cadillac\\nDiff:\n@@ -1,2 +1,2 @@\n-apple\n+cadillac\n" ./spec/spec/runner/formatter/../../../spec_helper.rb:12:in `should_fail_with' ./spec/spec/expectations/should/should_==_spec.rb:12 Finished in 1.156677 seconds 474 specifications, 1 failure (NOTE - fewer specs, more failures) ======================== bin/spec spec -D 474 specifications, 0 failures ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 10:49 Message: I have turned off diffing in rake, so now rake spec should yield the same results as ruby -Ilib bin/spec spec ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-01 18:23 Message: And the reason why bin/spec spec won't work is that you're running off the gem. I just fixed a regression in diffing (which your gem probably had), which is why you got failures even when passing --diff. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-01 18:20 Message: Try: ruby -Ilib bin/spec spec --diff This will give the same result as rake, which runs the specs with --diff The reason why there are more specs with rake is that it also runs the RSpec.tmbundle specs ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-01 17:44 Message: OK - turns out the diffing is turned on when running rake spec, but not when running the spec command. I'd like to get the failing spec (when running the spec command) to pass (when running the spec command). I've tried a few things like turning diffing on and off around that spec and it's not working. More to come.... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7005&group_id=797 From noreply at rubyforge.org Sat Dec 2 11:14:42 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 11:14:42 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7010 ] Fixes :spacer_template does not work w/ view spec Message-ID: <20061202161442.67A695240EFD@rubyforge.org> Patches item #7010, was opened at 2006-12-03 01:14 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7010&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Nobody (None) Summary: Fixes :spacer_template does not work w/ view spec Initial Comment: Rspec on Rails can't find :spacer_template path correctly. <%= render :partial => 'included_partial_collection_with_spacer_template', :collection => ['Alice', 'Bob'], :spacer_template => 'spacer' %> I've made quick fix for that. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7010&group_id=797 From noreply at rubyforge.org Sat Dec 2 11:15:45 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 11:15:45 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7010 ] Fixes :spacer_template does not work w/ view spec Message-ID: <20061202161546.110F95240EEC@rubyforge.org> Patches item #7010, was opened at 2006-12-03 01:14 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7010&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Nobody (None) Summary: Fixes :spacer_template does not work w/ view spec Initial Comment: Rspec on Rails can't find :spacer_template path correctly. <%= render :partial => 'included_partial_collection_with_spacer_template', :collection => ['Alice', 'Bob'], :spacer_template => 'spacer' %> I've made quick fix for that. ---------------------------------------------------------------------- >Comment By: Shintaro Kakutani (kakutani) Date: 2006-12-03 01:15 Message: (I forgot click the file upload checkbox...) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7010&group_id=797 From noreply at rubyforge.org Sat Dec 2 11:35:34 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 11:35:34 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6798 ] ensure two ':' in the first backtrace line for Emacs's 'next-error' command Message-ID: <20061202163535.1643B5241021@rubyforge.org> Patches item #6798, was opened at 2006-11-21 02:55 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6798&group_id=797 Category: runner module Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Kouhei Sutou (kou) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: ensure two ':' in the first backtrace line for Emacs's 'next-error' command Initial Comment: I'm running RSpec on Emacs's compilation mode. In compilation mode, we can jump to next error by C-x `. And compilation mode recognize error location by the following format: PATH:LINE_NO:[OPTIONAL_MESSAGE] RSpec output backtrace like the following format: PATH:LINE_NO[: OPTIONAL_MESSAGE] We can jump to an error location when there is ':' after LINE_NO but RSpec doesn't output ':' after LINE_NO anytime. Could you output ':' after LINE_NO to use C-x `? But I think RSpec doesn't need to output the ':' anytime. RSpec needs to output the ':' only when the first line in backtrace. Because we are interested in the location where the error is occurred but aren't interested in other location in backtrace. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:35 Message: Fixed in r1196. Good patch! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6798&group_id=797 From noreply at rubyforge.org Sat Dec 2 11:46:28 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 11:46:28 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7010 ] Fixes :spacer_template does not work w/ view spec Message-ID: <20061202164628.E3D105241023@rubyforge.org> Patches item #7010, was opened at 2006-12-02 11:14 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7010&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Shintaro Kakutani (kakutani) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Fixes :spacer_template does not work w/ view spec Initial Comment: Rspec on Rails can't find :spacer_template path correctly. <%= render :partial => 'included_partial_collection_with_spacer_template', :collection => ['Alice', 'Bob'], :spacer_template => 'spacer' %> I've made quick fix for that. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:46 Message: Applied in trunk r1197 Good patch! ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-12-02 11:15 Message: (I forgot click the file upload checkbox...) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7010&group_id=797 From noreply at rubyforge.org Sat Dec 2 11:49:03 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 11:49:03 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6720 ] [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Message-ID: <20061202164903.D5C055241023@rubyforge.org> Patches item #6720, was opened at 2006-11-17 00:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Initial Comment: Here's a stack trace (not mine, it's from aniero's app): TypeError in 'An instance of a Report model should set the condition relationships based on the condition string on save' wrong argument type Condition (expected Module) ../vendor/rails/activerecord/lib/active_record/base.rb:1235:in `method_missing' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ../vendor/rails/activerecord/lib/active_record/base.rb:943:in `with_scope' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ./spec/models/report_spec.rb:36 After some digging with bitsweat's assistance, it turns out that there are four different method_missing implementations in ActiveRecord that can be invoked when calling methods on associations. 1. AssociationProxy, for has_one and belongs_to 2. HasManyAssociation, for has_many 3. HasAndBelongsToManyAssociation, for habtm 4. HasManyThroughAssociation, for has_many through AssociationProxy's method_missing is pretty simple, and doesn't need wrapping. The others, however, make some decisions using respond_to?, etc, etc, and need RSpec to step in ahead of them. This patch adds the other two necessary. An example of where this currently fails is: @record.has_many_association.include? fixtures(:something) The 'rspec_on_rails' sample app doesn't include any habtm or hmt associations, so I couldn't write any specs to cover this. It might be worth adding those, so we can catch this kind of fun. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:49 Message: Wilson, did you get a chance to write new models and patch the app? If you add new files, make sure to svn add them locally before generating the patch. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-17 10:07 Message: OK. I will do that today. I guess it will need a couple of new models. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-17 09:35 Message: Would you like to patch the sample app so we have those specs? The sample app specs get run during the build, and serve as acceptance level tests. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 From noreply at rubyforge.org Sat Dec 2 13:00:48 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 13:00:48 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6720 ] [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Message-ID: <20061202180048.98DE55241040@rubyforge.org> Patches item #6720, was opened at 2006-11-17 00:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Initial Comment: Here's a stack trace (not mine, it's from aniero's app): TypeError in 'An instance of a Report model should set the condition relationships based on the condition string on save' wrong argument type Condition (expected Module) ../vendor/rails/activerecord/lib/active_record/base.rb:1235:in `method_missing' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ../vendor/rails/activerecord/lib/active_record/base.rb:943:in `with_scope' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ./spec/models/report_spec.rb:36 After some digging with bitsweat's assistance, it turns out that there are four different method_missing implementations in ActiveRecord that can be invoked when calling methods on associations. 1. AssociationProxy, for has_one and belongs_to 2. HasManyAssociation, for has_many 3. HasAndBelongsToManyAssociation, for habtm 4. HasManyThroughAssociation, for has_many through AssociationProxy's method_missing is pretty simple, and doesn't need wrapping. The others, however, make some decisions using respond_to?, etc, etc, and need RSpec to step in ahead of them. This patch adds the other two necessary. An example of where this currently fails is: @record.has_many_association.include? fixtures(:something) The 'rspec_on_rails' sample app doesn't include any habtm or hmt associations, so I couldn't write any specs to cover this. It might be worth adding those, so we can catch this kind of fun. ---------------------------------------------------------------------- >Comment By: Wilson Bilkovich (wilson) Date: 2006-12-02 13:00 Message: I haven't yet, but I'm starting a new project this week (using rspec), so I should get to it soon. Does this relate to the other recent ticket about the methods that AssociationProxy undefines? Do we want to fix both at once? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:49 Message: Wilson, did you get a chance to write new models and patch the app? If you add new files, make sure to svn add them locally before generating the patch. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-17 10:07 Message: OK. I will do that today. I guess it will need a couple of new models. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-17 09:35 Message: Would you like to patch the sample app so we have those specs? The sample app specs get run during the build, and serve as acceptance level tests. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 From noreply at rubyforge.org Sat Dec 2 13:07:02 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 13:07:02 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6720 ] [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Message-ID: <20061202180702.1E32F52410B4@rubyforge.org> Patches item #6720, was opened at 2006-11-17 00:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Initial Comment: Here's a stack trace (not mine, it's from aniero's app): TypeError in 'An instance of a Report model should set the condition relationships based on the condition string on save' wrong argument type Condition (expected Module) ../vendor/rails/activerecord/lib/active_record/base.rb:1235:in `method_missing' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ../vendor/rails/activerecord/lib/active_record/base.rb:943:in `with_scope' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ./spec/models/report_spec.rb:36 After some digging with bitsweat's assistance, it turns out that there are four different method_missing implementations in ActiveRecord that can be invoked when calling methods on associations. 1. AssociationProxy, for has_one and belongs_to 2. HasManyAssociation, for has_many 3. HasAndBelongsToManyAssociation, for habtm 4. HasManyThroughAssociation, for has_many through AssociationProxy's method_missing is pretty simple, and doesn't need wrapping. The others, however, make some decisions using respond_to?, etc, etc, and need RSpec to step in ahead of them. This patch adds the other two necessary. An example of where this currently fails is: @record.has_many_association.include? fixtures(:something) The 'rspec_on_rails' sample app doesn't include any habtm or hmt associations, so I couldn't write any specs to cover this. It might be worth adding those, so we can catch this kind of fun. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 13:07 Message: I'm not sure what other ticket this relates to, but it's ok to fix two bugs in one patch. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-12-02 13:00 Message: I haven't yet, but I'm starting a new project this week (using rspec), so I should get to it soon. Does this relate to the other recent ticket about the methods that AssociationProxy undefines? Do we want to fix both at once? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:49 Message: Wilson, did you get a chance to write new models and patch the app? If you add new files, make sure to svn add them locally before generating the patch. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-17 10:07 Message: OK. I will do that today. I guess it will need a couple of new models. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-17 09:35 Message: Would you like to patch the sample app so we have those specs? The sample app specs get run during the build, and serve as acceptance level tests. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 From noreply at rubyforge.org Sat Dec 2 13:17:07 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 13:17:07 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6720 ] [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Message-ID: <20061202181707.C3A135241023@rubyforge.org> Patches item #6720, was opened at 2006-11-17 00:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] ActiveRecord has_many :through and has_and_belongs_to_many break 'should' Initial Comment: Here's a stack trace (not mine, it's from aniero's app): TypeError in 'An instance of a Report model should set the condition relationships based on the condition string on save' wrong argument type Condition (expected Module) ../vendor/rails/activerecord/lib/active_record/base.rb:1235:in `method_missing' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ../vendor/rails/activerecord/lib/active_record/base.rb:943:in `with_scope' ../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:110:in `method_missing' ./spec/models/report_spec.rb:36 After some digging with bitsweat's assistance, it turns out that there are four different method_missing implementations in ActiveRecord that can be invoked when calling methods on associations. 1. AssociationProxy, for has_one and belongs_to 2. HasManyAssociation, for has_many 3. HasAndBelongsToManyAssociation, for habtm 4. HasManyThroughAssociation, for has_many through AssociationProxy's method_missing is pretty simple, and doesn't need wrapping. The others, however, make some decisions using respond_to?, etc, etc, and need RSpec to step in ahead of them. This patch adds the other two necessary. An example of where this currently fails is: @record.has_many_association.include? fixtures(:something) The 'rspec_on_rails' sample app doesn't include any habtm or hmt associations, so I couldn't write any specs to cover this. It might be worth adding those, so we can catch this kind of fun. ---------------------------------------------------------------------- >Comment By: Wilson Bilkovich (wilson) Date: 2006-12-02 13:17 Message: I was referring to this one: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6980&group_id=797 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 13:07 Message: I'm not sure what other ticket this relates to, but it's ok to fix two bugs in one patch. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-12-02 13:00 Message: I haven't yet, but I'm starting a new project this week (using rspec), so I should get to it soon. Does this relate to the other recent ticket about the methods that AssociationProxy undefines? Do we want to fix both at once? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:49 Message: Wilson, did you get a chance to write new models and patch the app? If you add new files, make sure to svn add them locally before generating the patch. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-17 10:07 Message: OK. I will do that today. I guess it will need a couple of new models. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-17 09:35 Message: Would you like to patch the sample app so we have those specs? The sample app specs get run during the build, and serve as acceptance level tests. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6720&group_id=797 From noreply at rubyforge.org Sat Dec 2 20:41:53 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 20:41:53 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6989 ] partials with locals Message-ID: <20061203014154.4250D5241BB8@rubyforge.org> Patches item #6989, was opened at 2006-11-30 16:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6989&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Micah Martin (slagyr) Assigned to: Nobody (None) Summary: partials with locals Initial Comment: Here's a potential fix for the view specs. The problem was tests like this: specify "blah" do widget = mock("widget") render "/path/to/_partial", :locals => {:widget => widget} end The view ViewEvalContext seems to expect all renders to be full templates. Normally it's not a problem but in this case I'm using the :locals options which is not applied to :template rendering. So I tried this: render :partial => "/path/to/partial", :locals => {:widget => widget} But that failed because ViewEvalContext is expecting :templates. I was able to get it to work by modifying ViewEvalContext a tiny bit: Original: @controller.add_helper_for(options[:template]) Modified: @controller.add_helper_for(options[:template]) if options[:template] @controller.add_helper_for(options[:partial]) if options[:partial] To complete a spec, the partial template might look like this: <%= widget.to_s %> Any chance this could be added to trunk? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:54 Message: Hi Micah, Could you modify the RSpec demo app and other files and create a patch file for us? svn patch > patch_for_partials_with_locals.diff ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6989&group_id=797 From noreply at rubyforge.org Sat Dec 2 20:45:13 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 2 Dec 2006 20:45:13 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-6989 ] partials with locals Message-ID: <20061203014513.820105241BCD@rubyforge.org> Patches item #6989, was opened at 2006-11-30 16:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6989&group_id=797 >Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Micah Martin (slagyr) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: partials with locals Initial Comment: Here's a potential fix for the view specs. The problem was tests like this: specify "blah" do widget = mock("widget") render "/path/to/_partial", :locals => {:widget => widget} end The view ViewEvalContext seems to expect all renders to be full templates. Normally it's not a problem but in this case I'm using the :locals options which is not applied to :template rendering. So I tried this: render :partial => "/path/to/partial", :locals => {:widget => widget} But that failed because ViewEvalContext is expecting :templates. I was able to get it to work by modifying ViewEvalContext a tiny bit: Original: @controller.add_helper_for(options[:template]) Modified: @controller.add_helper_for(options[:template]) if options[:template] @controller.add_helper_for(options[:partial]) if options[:partial] To complete a spec, the partial template might look like this: <%= widget.to_s %> Any chance this could be added to trunk? ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 20:45 Message: Applied on trunk r1204 Good patch! ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-02 11:54 Message: Hi Micah, Could you modify the RSpec demo app and other files and create a patch file for us? svn patch > patch_for_partials_with_locals.diff ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6989&group_id=797 From noreply at rubyforge.org Sun Dec 3 02:08:33 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 02:08:33 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061203070833.B09765241D2B@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 16:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: Pat Maddox (pergesu) Date: 2006-12-03 00:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 16:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 18:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 18:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 17:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 17:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Sun Dec 3 02:10:17 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 02:10:17 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061203071017.C053B5241D2B@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 23:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 07:10 Message: It will probably happen by mid-week. David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-03 07:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 23:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 01:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 01:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 01:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 01:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 00:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 00:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 00:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 00:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Sun Dec 3 10:02:24 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 10:02:24 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7022 ] html_formatter_spec.rb fails in trunk (rev.1204) Message-ID: <20061203150224.E7D4A5241250@rubyforge.org> Bugs item #7022, was opened at 2006-12-04 00:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Nobody (None) Summary: html_formatter_spec.rb fails in trunk (rev.1204) Initial Comment: html_formatter_spec.rb fails in trunk (rev.1204) fails on my environment. I can't do the problem determination that html_formatted.html is wrong or not, so just only paste failing result: $ spec spec/spec/runner/formatter/html_formatter_spec.rb 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED ... Diff: @@ -117,12 +117,10 @@ should fail when expected message not received
Mock 'poke me' expected :poke with (any args) once, but received it 0 times
-
./failing_examples/mocking_example.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -133,12 +131,10 @@
Mock 'one two three' received :three out of order
(eval):3:in `three'
-./failing_examples/mocking_example.rb:22
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+./failing_examples/mocking_example.rb:22: +./spec/spec/runner/formatter/html_formatter_spec.rb:14: +./spec/spec/runner/formatter/html_formatter_spec.rb:10: +./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -148,12 +144,10 @@ should get yelled at when sending unexpected messages
Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once
-
./failing_examples/mocking_example.rb:28
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:28:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -175,12 +169,10 @@ +behaviour driven development framework for Ruby -
./failing_examples/diffing_spec.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -206,12 +198,10 @@ +species=tortoise > -
./failing_examples/diffing_spec.rb:34
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:34:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
./spec/spec/runner/formatter/html_formatter_spec.rb:29 ./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir' ./spec/spec/runner/formatter/html_formatter_spec.rb:10 ./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each' ./spec/spec/runner/formatter/html_formatter_spec.rb:9 Finished in 0.074148 seconds 1 specification, 1 failure ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 From noreply at rubyforge.org Sun Dec 3 11:31:53 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 11:31:53 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7023 ] Typo in team.page Message-ID: <20061203163153.6C0CD52412B6@rubyforge.org> Patches item #7023, was opened at 2006-12-04 01:31 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7023&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Nobody (None) Summary: Typo in team.page Initial Comment: I've found a typo about my friend's name in team.page: Index: doc/src/team.page =================================================================== --- doc/src/team.page (revision 1204) +++ doc/src/team.page (working copy) @@ -44,7 +44,7 @@ * Luke Redpath (TextMate bundle) * Nick Sieger (RSpec on Rails patches for stats) * Daniel Siemssen (RSpec on Rails patches for rails_spec_server) -* Kouhei Sotu (Emacs patch) +* Kouhei Sutou (Emacs patch) * Nikolai Weibull (Core patches for spec names) * Mike Williams (Core patches for arbitrary comparisons like 5.should_be < 6) * Chad Wooley (Patch to mocks to make it possible to specify raised exception instance) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7023&group_id=797 From noreply at rubyforge.org Sun Dec 3 11:51:36 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 11:51:36 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7022 ] html_formatter_spec.rb fails in trunk (rev.1204) Message-ID: <20061203165136.E3F3952412BA@rubyforge.org> Bugs item #7022, was opened at 2006-12-03 15:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Shintaro Kakutani (kakutani) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: html_formatter_spec.rb fails in trunk (rev.1204) Initial Comment: html_formatter_spec.rb fails in trunk (rev.1204) fails on my environment. I can't do the problem determination that html_formatted.html is wrong or not, so just only paste failing result: $ spec spec/spec/runner/formatter/html_formatter_spec.rb 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED ... Diff: @@ -117,12 +117,10 @@ should fail when expected message not received
Mock 'poke me' expected :poke with (any args) once, but received it 0 times
-
./failing_examples/mocking_example.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -133,12 +131,10 @@
Mock 'one two three' received :three out of order
(eval):3:in `three'
-./failing_examples/mocking_example.rb:22
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+./failing_examples/mocking_example.rb:22: +./spec/spec/runner/formatter/html_formatter_spec.rb:14: +./spec/spec/runner/formatter/html_formatter_spec.rb:10: +./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -148,12 +144,10 @@ should get yelled at when sending unexpected messages
Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once
-
./failing_examples/mocking_example.rb:28
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:28:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -175,12 +169,10 @@ +behaviour driven development framework for Ruby -
./failing_examples/diffing_spec.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -206,12 +198,10 @@ +species=tortoise > -
./failing_examples/diffing_spec.rb:34
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:34:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
./spec/spec/runner/formatter/html_formatter_spec.rb:29 ./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir' ./spec/spec/runner/formatter/html_formatter_spec.rb:10 ./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each' ./spec/spec/runner/formatter/html_formatter_spec.rb:9 Finished in 0.074148 seconds 1 specification, 1 failure ---------------------------------------------------------------------- >Comment By: Luke Redpath (lukeredpath) Date: 2006-12-03 16:51 Message: I've been doing some work on the HTML formatter which is being integrated by Aslak - he's doing some work to simplify the specs so these should be passing again soon. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 From noreply at rubyforge.org Sun Dec 3 12:00:46 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 12:00:46 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7022 ] html_formatter_spec.rb fails in trunk (rev.1204) Message-ID: <20061203170049.52B3C52412BA@rubyforge.org> Bugs item #7022, was opened at 2006-12-03 10:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 Category: runner module Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: html_formatter_spec.rb fails in trunk (rev.1204) Initial Comment: html_formatter_spec.rb fails in trunk (rev.1204) fails on my environment. I can't do the problem determination that html_formatted.html is wrong or not, so just only paste failing result: $ spec spec/spec/runner/formatter/html_formatter_spec.rb 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED ... Diff: @@ -117,12 +117,10 @@ should fail when expected message not received
Mock 'poke me' expected :poke with (any args) once, but received it 0 times
-
./failing_examples/mocking_example.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -133,12 +131,10 @@
Mock 'one two three' received :three out of order
(eval):3:in `three'
-./failing_examples/mocking_example.rb:22
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+./failing_examples/mocking_example.rb:22: +./spec/spec/runner/formatter/html_formatter_spec.rb:14: +./spec/spec/runner/formatter/html_formatter_spec.rb:10: +./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -148,12 +144,10 @@ should get yelled at when sending unexpected messages
Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once
-
./failing_examples/mocking_example.rb:28
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:28:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -175,12 +169,10 @@ +behaviour driven development framework for Ruby -
./failing_examples/diffing_spec.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -206,12 +198,10 @@ +species=tortoise > -
./failing_examples/diffing_spec.rb:34
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:34:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
./spec/spec/runner/formatter/html_formatter_spec.rb:29 ./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir' ./spec/spec/runner/formatter/html_formatter_spec.rb:10 ./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each' ./spec/spec/runner/formatter/html_formatter_spec.rb:9 Finished in 0.074148 seconds 1 specification, 1 failure ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-03 12:00 Message: You must run bin/spec (and not spec, which will use your gem's spec command, which is probably a little different). I have done the spec refactorings Luke is referring to, so there is nothing pending on my part. Here are some examples: http://rspec.rubyforge.org/report.html http://rspec.rubyforge.org/tools/failing_examples.html ---------------------------------------------------------------------- Comment By: Luke Redpath (lukeredpath) Date: 2006-12-03 11:51 Message: I've been doing some work on the HTML formatter which is being integrated by Aslak - he's doing some work to simplify the specs so these should be passing again soon. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 From noreply at rubyforge.org Sun Dec 3 12:02:29 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 12:02:29 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7022 ] html_formatter_spec.rb fails in trunk (rev.1204) Message-ID: <20061203170229.E30CC52412CC@rubyforge.org> Bugs item #7022, was opened at 2006-12-03 15:02 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 Category: runner module Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: html_formatter_spec.rb fails in trunk (rev.1204) Initial Comment: html_formatter_spec.rb fails in trunk (rev.1204) fails on my environment. I can't do the problem determination that html_formatted.html is wrong or not, so just only paste failing result: $ spec spec/spec/runner/formatter/html_formatter_spec.rb 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED ... Diff: @@ -117,12 +117,10 @@ should fail when expected message not received
Mock 'poke me' expected :poke with (any args) once, but received it 0 times
-
./failing_examples/mocking_example.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -133,12 +131,10 @@
Mock 'one two three' received :three out of order
(eval):3:in `three'
-./failing_examples/mocking_example.rb:22
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+./failing_examples/mocking_example.rb:22: +./spec/spec/runner/formatter/html_formatter_spec.rb:14: +./spec/spec/runner/formatter/html_formatter_spec.rb:10: +./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -148,12 +144,10 @@ should get yelled at when sending unexpected messages
Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once
-
./failing_examples/mocking_example.rb:28
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/mocking_example.rb:28:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -175,12 +169,10 @@ +behaviour driven development framework for Ruby -
./failing_examples/diffing_spec.rb:13
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:13:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
@@ -206,12 +198,10 @@ +species=tortoise > -
./failing_examples/diffing_spec.rb:34
-./spec/spec/runner/formatter/html_formatter_spec.rb:14
-./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir'
-./spec/spec/runner/formatter/html_formatter_spec.rb:10
-./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each'
-./spec/spec/runner/formatter/html_formatter_spec.rb:9
+
./failing_examples/diffing_spec.rb:34:
+./spec/spec/runner/formatter/html_formatter_spec.rb:14:
+./spec/spec/runner/formatter/html_formatter_spec.rb:10:
+./spec/spec/runner/formatter/html_formatter_spec.rb:9:
./spec/spec/runner/formatter/html_formatter_spec.rb:29 ./spec/spec/runner/formatter/html_formatter_spec.rb:10:in `chdir' ./spec/spec/runner/formatter/html_formatter_spec.rb:10 ./spec/spec/runner/formatter/html_formatter_spec.rb:9:in `each' ./spec/spec/runner/formatter/html_formatter_spec.rb:9 Finished in 0.074148 seconds 1 specification, 1 failure ---------------------------------------------------------------------- >Comment By: Luke Redpath (lukeredpath) Date: 2006-12-03 17:02 Message: Ah, nice one Aslak. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-03 17:00 Message: You must run bin/spec (and not spec, which will use your gem's spec command, which is probably a little different). I have done the spec refactorings Luke is referring to, so there is nothing pending on my part. Here are some examples: http://rspec.rubyforge.org/report.html http://rspec.rubyforge.org/tools/failing_examples.html ---------------------------------------------------------------------- Comment By: Luke Redpath (lukeredpath) Date: 2006-12-03 16:51 Message: I've been doing some work on the HTML formatter which is being integrated by Aslak - he's doing some work to simplify the specs so these should be passing again soon. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7022&group_id=797 From noreply at rubyforge.org Sun Dec 3 12:02:55 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 12:02:55 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7023 ] Typo in team.page Message-ID: <20061203170255.6F18352412CC@rubyforge.org> Patches item #7023, was opened at 2006-12-03 11:31 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7023&group_id=797 Category: None Group: None >Status: Deleted >Resolution: Accepted Priority: 3 Submitted By: Shintaro Kakutani (kakutani) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Typo in team.page Initial Comment: I've found a typo about my friend's name in team.page: Index: doc/src/team.page =================================================================== --- doc/src/team.page (revision 1204) +++ doc/src/team.page (working copy) @@ -44,7 +44,7 @@ * Luke Redpath (TextMate bundle) * Nick Sieger (RSpec on Rails patches for stats) * Daniel Siemssen (RSpec on Rails patches for rails_spec_server) -* Kouhei Sotu (Emacs patch) +* Kouhei Sutou (Emacs patch) * Nikolai Weibull (Core patches for spec names) * Mike Williams (Core patches for arbitrary comparisons like 5.should_be < 6) * Chad Wooley (Patch to mocks to make it possible to specify raised exception instance) ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-03 12:02 Message: Fixed in r1205 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7023&group_id=797 From noreply at rubyforge.org Sun Dec 3 12:23:18 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 12:23:18 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7025 ] should_change should accept a block Message-ID: <20061203172318.3129652412BA@rubyforge.org> Feature Requests item #7025, was opened at 2006-12-03 17:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 Category: expectation module Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: should_change should accept a block Initial Comment: In addition to this: lambda { @team.add player }.should_change(@team.players, :size).by(1) I want to be able to do this: lambda { @team.add player }.should_change{@team.players.size}.by(1) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 From noreply at rubyforge.org Sun Dec 3 12:29:20 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 12:29:20 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7025 ] should_change should accept a block Message-ID: <20061203172920.493D452412BA@rubyforge.org> Feature Requests item #7025, was opened at 2006-12-03 17:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 Category: expectation module Group: None >Status: Closed Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: should_change should accept a block Initial Comment: In addition to this: lambda { @team.add player }.should_change(@team.players, :size).by(1) I want to be able to do this: lambda { @team.add player }.should_change{@team.players.size}.by(1) ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 17:29 Message: Added in trunk (rev. 1206) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 From noreply at rubyforge.org Sun Dec 3 12:46:56 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 12:46:56 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7025 ] should_change should accept a block Message-ID: <20061203174658.46ACC52413D0@rubyforge.org> Feature Requests item #7025, was opened at 2006-12-03 12:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 Category: expectation module Group: None Status: Closed Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: should_change should accept a block Initial Comment: In addition to this: lambda { @team.add player }.should_change(@team.players, :size).by(1) I want to be able to do this: lambda { @team.add player }.should_change{@team.players.size}.by(1) ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-03 12:46 Message: Is it documented? I didn't see any changes to doc/* when I svn upped. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 12:29 Message: Added in trunk (rev. 1206) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 From aslak.hellesoy at gmail.com Sun Dec 3 13:41:32 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Sun, 3 Dec 2006 19:41:32 +0100 Subject: [rspec-devel] [ANN] RSpec 0.7.4 released Message-ID: <8d961d900612031041n6fc41294x2ee4073b406f4f52@mail.gmail.com> Hi all, I released RSpec 0.7.4 yesterday, and by now the gems should have rsync'ed to all the mirrors. This release features a complete redesign of the reports generated with --format html. You can see some examples of it here: http://rspec.rubyforge.org/report.html http://rspec.rubyforge.org/tools/failing_examples.html As usual there are many bug fixes - mostly related to spec/rails. If you run into problems, please report bugs, patches or feature requests in the tracker at rubyforge: http://rubyforge.org/tracker/?group_id=797 Full release notes: http://rubyforge.org/frs/shownotes.php?release_id=8243 Cheers, Aslak From noreply at rubyforge.org Sun Dec 3 14:41:26 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 3 Dec 2006 14:41:26 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7025 ] should_change should accept a block Message-ID: <20061203194126.5CCCC5241681@rubyforge.org> Feature Requests item #7025, was opened at 2006-12-03 17:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 Category: expectation module Group: None Status: Closed Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: should_change should accept a block Initial Comment: In addition to this: lambda { @team.add player }.should_change(@team.players, :size).by(1) I want to be able to do this: lambda { @team.add player }.should_change{@team.players.size}.by(1) ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 19:41 Message: I had documented in rdoc but not in the website docs. I want to move all the docs to rdoc, so for now we'll have to document in both places. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-03 17:46 Message: Is it documented? I didn't see any changes to doc/* when I svn upped. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 17:29 Message: Added in trunk (rev. 1206) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7025&group_id=797 From dchelimsky at gmail.com Sun Dec 3 22:08:56 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Sun, 3 Dec 2006 21:08:56 -0600 Subject: [rspec-devel] directory structure change Message-ID: <57c63afe0612031908t20b50051l661ab557c819425b@mail.gmail.com> IMPORTANT NOTE FOR THOSE OF YOU WHO CHECK OUT SOURCE FROM SUBVERSION AT SOURCEFORGE (the rest of you may press delete now.....) ======================================================== Hi all, Just a heads up that sometime on Monday the directory structure of RSpec is going to be changed in subversion. The goal is cleaner separation of various components, especially the rails plugin. I'll email a few minutes before the change with details about where to find what, and then immediately after the change to let you know that it's done. Cheers, David From noreply at rubyforge.org Mon Dec 4 01:25:38 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 01:25:38 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6971 ] and_yield does not work when the arity is -1 Message-ID: <20061204062538.DD7025241DAE@rubyforge.org> Bugs item #6971, was opened at 2006-11-29 15:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: and_yield does not work when the arity is -1 Initial Comment: def foo(bar) bar.call {|*args|} end bar = mock("bar) bar.should_receive(:call).and_yield foo(bar) # Mock 'bar' yielded || to block with arity of -1 ---------------------------------------------------------------------- >Comment By: Brian Takita (btakita) Date: 2006-12-03 22:25 Message: Right. I feel like this should work. The block takes a variable number or arguments and I give it no arguments. In Ruby, I'm able to call a proc that has an arity of -1 with 0 arguments. proc {}.call # This works. proc {||}.call # This works. proc {||}.call(1) # This does not work. proc {|*args| }.call # This works. proc {|arg| }.call # This does not work. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-30 19:03 Message: As I understand it, this is the correct behavior: irb(main):021:0> proc {}.arity => -1 irb(main):022:0> proc {||}.arity => 0 irb(main):023:0> proc {|arg|}.arity => 1 irb(main):024:0> proc {|*args|}.arity => -1 In your example, you are yielding 0 orgs to a proc with an arity of -1. Am I missing something? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 From noreply at rubyforge.org Mon Dec 4 01:42:44 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 01:42:44 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6971 ] and_yield does not work when the arity is -1 Message-ID: <20061204064244.9623C5241DC1@rubyforge.org> Bugs item #6971, was opened at 2006-11-29 15:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: and_yield does not work when the arity is -1 Initial Comment: def foo(bar) bar.call {|*args|} end bar = mock("bar) bar.should_receive(:call).and_yield foo(bar) # Mock 'bar' yielded || to block with arity of -1 ---------------------------------------------------------------------- >Comment By: Brian Takita (btakita) Date: 2006-12-03 22:42 Message: I attached the patch for fix with its spec. See spec: a Mock expectation - should yield blocks that take a variable number of arguments and invoke_with_yield in message_expectation.rb ---------------------------------------------------------------------- Comment By: Brian Takita (btakita) Date: 2006-12-03 22:25 Message: Right. I feel like this should work. The block takes a variable number or arguments and I give it no arguments. In Ruby, I'm able to call a proc that has an arity of -1 with 0 arguments. proc {}.call # This works. proc {||}.call # This works. proc {||}.call(1) # This does not work. proc {|*args| }.call # This works. proc {|arg| }.call # This does not work. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-30 19:03 Message: As I understand it, this is the correct behavior: irb(main):021:0> proc {}.arity => -1 irb(main):022:0> proc {||}.arity => 0 irb(main):023:0> proc {|arg|}.arity => 1 irb(main):024:0> proc {|*args|}.arity => -1 In your example, you are yielding 0 orgs to a proc with an arity of -1. Am I missing something? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 From noreply at rubyforge.org Mon Dec 4 01:43:09 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 01:43:09 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6971 ] and_yield does not work when the arity is -1 Message-ID: <20061204064309.D47A55241DC1@rubyforge.org> Bugs item #6971, was opened at 2006-11-29 15:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: and_yield does not work when the arity is -1 Initial Comment: def foo(bar) bar.call {|*args|} end bar = mock("bar) bar.should_receive(:call).and_yield foo(bar) # Mock 'bar' yielded || to block with arity of -1 ---------------------------------------------------------------------- Comment By: Brian Takita (btakita) Date: 2006-12-03 22:42 Message: I attached the patch for fix with its spec. See spec: a Mock expectation - should yield blocks that take a variable number of arguments and invoke_with_yield in message_expectation.rb ---------------------------------------------------------------------- Comment By: Brian Takita (btakita) Date: 2006-12-03 22:25 Message: Right. I feel like this should work. The block takes a variable number or arguments and I give it no arguments. In Ruby, I'm able to call a proc that has an arity of -1 with 0 arguments. proc {}.call # This works. proc {||}.call # This works. proc {||}.call(1) # This does not work. proc {|*args| }.call # This works. proc {|arg| }.call # This does not work. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-30 19:03 Message: As I understand it, this is the correct behavior: irb(main):021:0> proc {}.arity => -1 irb(main):022:0> proc {||}.arity => 0 irb(main):023:0> proc {|arg|}.arity => 1 irb(main):024:0> proc {|*args|}.arity => -1 In your example, you are yielding 0 orgs to a proc with an arity of -1. Am I missing something? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 From noreply at rubyforge.org Mon Dec 4 02:03:23 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 02:03:23 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7033 ] After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Message-ID: <20061204070323.C180F5241DC3@rubyforge.org> Bugs item #7033, was opened at 2006-12-04 02:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Initial Comment: (Edge rails, os x) To isolate, I generated a new blank model, and the same behaviour occurred: Given a generated blank_spec.rb with fixtures loaded - fixtures should load two Blanks (ERROR - 1) - you shoud add more specs (ERROR - 2) 1) TypeError in 'Given a generated blank_spec.rb with fixtures loaded fixtures should load two Blanks' can't convert nil into String 2) TypeError in 'Given a generated blank_spec.rb with fixtures loaded you shoud add more specs' can't convert nil into String In the test log, there is the following error, regardless of whether fixtures are loaded: (don't know if it is related) Spec::Rails::HelperEvalContextController: missing default helper path spec/rails/helper_eval_context_helper Spec::Rails::ViewSpecController: missing default helper path spec/rails/view_spec_helper I have tried re-installing both gem & plugin. How do I get it to give me a stack trace so I can try to figure out where it is breaking? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 From noreply at rubyforge.org Mon Dec 4 03:29:26 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 03:29:26 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7033 ] After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Message-ID: <20061204082926.D5FA05241DD2@rubyforge.org> Bugs item #7033, was opened at 2006-12-04 09:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Initial Comment: (Edge rails, os x) To isolate, I generated a new blank model, and the same behaviour occurred: Given a generated blank_spec.rb with fixtures loaded - fixtures should load two Blanks (ERROR - 1) - you shoud add more specs (ERROR - 2) 1) TypeError in 'Given a generated blank_spec.rb with fixtures loaded fixtures should load two Blanks' can't convert nil into String 2) TypeError in 'Given a generated blank_spec.rb with fixtures loaded you shoud add more specs' can't convert nil into String In the test log, there is the following error, regardless of whether fixtures are loaded: (don't know if it is related) Spec::Rails::HelperEvalContextController: missing default helper path spec/rails/helper_eval_context_helper Spec::Rails::ViewSpecController: missing default helper path spec/rails/view_spec_helper I have tried re-installing both gem & plugin. How do I get it to give me a stack trace so I can try to figure out where it is breaking? ---------------------------------------------------------------------- Comment By: Yurii Rashkovskii (yrashk) Date: 2006-12-04 10:29 Message: Have you invoked ./script/generate rspec? http://www.rashkovskii.com/articles/2006/12/02/rspec-0-7-4 Yurii. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 From noreply at rubyforge.org Mon Dec 4 06:18:54 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 06:18:54 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7033 ] After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Message-ID: <20061204111854.33EB15240AAA@rubyforge.org> Bugs item #7033, was opened at 2006-12-04 07:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Initial Comment: (Edge rails, os x) To isolate, I generated a new blank model, and the same behaviour occurred: Given a generated blank_spec.rb with fixtures loaded - fixtures should load two Blanks (ERROR - 1) - you shoud add more specs (ERROR - 2) 1) TypeError in 'Given a generated blank_spec.rb with fixtures loaded fixtures should load two Blanks' can't convert nil into String 2) TypeError in 'Given a generated blank_spec.rb with fixtures loaded you shoud add more specs' can't convert nil into String In the test log, there is the following error, regardless of whether fixtures are loaded: (don't know if it is related) Spec::Rails::HelperEvalContextController: missing default helper path spec/rails/helper_eval_context_helper Spec::Rails::ViewSpecController: missing default helper path spec/rails/view_spec_helper I have tried re-installing both gem & plugin. How do I get it to give me a stack trace so I can try to figure out where it is breaking? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-04 11:18 Message: that was the problem, thanks. I had added some stuff to spec_helper and when I updated I didn't overwrite it. ---------------------------------------------------------------------- Comment By: Yurii Rashkovskii (yrashk) Date: 2006-12-04 08:29 Message: Have you invoked ./script/generate rspec? http://www.rashkovskii.com/articles/2006/12/02/rspec-0-7-4 Yurii. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 From noreply at rubyforge.org Mon Dec 4 06:51:14 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 06:51:14 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7033 ] After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Message-ID: <20061204115115.27ABA5240ADD@rubyforge.org> Bugs item #7033, was opened at 2006-12-04 02:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Nobody (None) >Assigned to: Aslak Helles?y (aslak_hellesoy) >Summary: After updating to 0_7_4, all tests which load fixtures have TypeError "can't convert nil into String" Initial Comment: (Edge rails, os x) To isolate, I generated a new blank model, and the same behaviour occurred: Given a generated blank_spec.rb with fixtures loaded - fixtures should load two Blanks (ERROR - 1) - you shoud add more specs (ERROR - 2) 1) TypeError in 'Given a generated blank_spec.rb with fixtures loaded fixtures should load two Blanks' can't convert nil into String 2) TypeError in 'Given a generated blank_spec.rb with fixtures loaded you shoud add more specs' can't convert nil into String In the test log, there is the following error, regardless of whether fixtures are loaded: (don't know if it is related) Spec::Rails::HelperEvalContextController: missing default helper path spec/rails/helper_eval_context_helper Spec::Rails::ViewSpecController: missing default helper path spec/rails/view_spec_helper I have tried re-installing both gem & plugin. How do I get it to give me a stack trace so I can try to figure out where it is breaking? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-04 06:18 Message: that was the problem, thanks. I had added some stuff to spec_helper and when I updated I didn't overwrite it. ---------------------------------------------------------------------- Comment By: Yurii Rashkovskii (yrashk) Date: 2006-12-04 03:29 Message: Have you invoked ./script/generate rspec? http://www.rashkovskii.com/articles/2006/12/02/rspec-0-7-4 Yurii. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7033&group_id=797 From noreply at rubyforge.org Mon Dec 4 07:47:53 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 07:47:53 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7038 ] View specs can't use helpers defined with helper_method Message-ID: <20061204124753.7C24B5240B1B@rubyforge.org> Bugs item #7038, was opened at 2006-12-04 05:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7038&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: View specs can't use helpers defined with helper_method Initial Comment: Assuming you have this controller: class FooController < ApplicationController helper_method :foo def foo; end end For a view spec where the view calls the foo helper method, you get an undefined method error. undefined method `foo' for #<#:0x26f71c0> edge rails, rspec 0.7.4 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7038&group_id=797 From noreply at rubyforge.org Mon Dec 4 08:04:21 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 4 Dec 2006 08:04:21 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061204130422.0713F5240B61@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Tue Dec 5 01:17:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 01:17:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7101 ] warning: useless use of == in void context Message-ID: <20061205061759.9EE255241711@rubyforge.org> Bugs item #7101, was opened at 2006-12-05 06:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: warning: useless use of == in void context Initial Comment: The new "should ==" syntax of rSpec (versions > 0.7.0) is causing these warnings: warning: useless use of == in void context In particular, each line of the following code causes the above warning: L0d_cache.l0d_p_rd_nack.intVal.should == 1 L0d_cache.l0d_l1_req.intVal.should == 1 Finally, I am seeing these warnings because I always run ruby with the '-w' option: 'ruby -w' Thanks for your consideration. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 From noreply at rubyforge.org Tue Dec 5 02:18:19 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 02:18:19 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-4462 ] Ability to use RSpec without the runner Message-ID: <20061205071819.31A115241720@rubyforge.org> Feature Requests item #4462, was opened at 2006-05-13 04:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: Ability to use RSpec without the runner Initial Comment: Hello, I was previously using the Ruby test/unit framework with a Ruby interpreter embedded inside a C program. In such a situation, I am unable to use an external runner program to bootstrap the Ruby interpreter, and I need the ability to work the other way around: bootstrap RSpec from within Ruby. This problem was discussed and solved (see attached file) at [ruby-talk: 192569]. Thanks for your attention. ---------------------------------------------------------------------- >Comment By: Suraj Kurapati (snk) Date: 2006-12-05 07:18 Message: Please see the new file (updated for rSpec 0.7.2). > Do you want us to add this file to RSpec's svn? Where? Yes. Please add it to SVN as (my suggestion): lib/rspec/runner.rb If you do that, then people can use rSpec from within Ruby by writing: require 'rubygems' require 'rspec' require 'rspec/runner' context "..." do specify "..." do # ... end end ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-05-20 01:40 Message: > Do you want us to add this file to RSpec's svn? Where? Perhaps not this exact file (I'm not sure it meets your coding standards), but something similar. > How does it compare to spec.rb? spec.rb doesn't allow simply 'require'ing or 'load'ing it to use RSpec: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'rspec' => true irb(main):003:0> require 'spec' => false irb(main):004:0> load 'spec' Usage: spec [options] (FILE|DIRECTORY)+ -b, --backtrace Output full backtrace -f, --format FORMAT Output format (specdoc|s|rdoc|r) -d, --dry-run Don't execute specs -s, --spec SPECIFICATION_NAME Execute a single specification -v, --version Show version -h, --help Show this message I am looking for functionality like test/unit, where simply 'require'ing that library will bootstrap it upon exit: irb(main):001:0> require 'test/unit' => true irb(main):002:0> quit Loaded suite irb Started Finished in 0.000675 seconds. 0 tests, 0 assertions, 0 failures, 0 errors /usr/lib/ruby/1.8/irb.rb:76:in `throw': uncaught throw `IRB_EXIT' (NameError) from /usr/lib/ruby/1.8/irb.rb:76:in `irb_exit' from /usr/lib/ruby/1.8/irb/context.rb:226:in `exit' from /usr/lib/ruby/1.8/irb/extend-command.rb:24:in `exit' from /usr/lib/ruby/1.8/test/unit.rb:285 from /usr/bin/irb:13 > Can you give some more examples about how and when it's used? Please see the attached file. It is executed by a Ruby interpreter embedded inside a C program (a Verilog simulator in this case). It is essential to have the ability to bootstrap the RSpec library from within the attached file (like test/unit bootstaps itself just by being 'require'd). Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-05-18 18:50 Message: Do you want us to add this file to RSpec's svn? Where? How does it compare to spec.rb? Can you give some more examples about how and when it's used? For future reference - the ruby-talk link is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 From noreply at rubyforge.org Tue Dec 5 02:19:13 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 02:19:13 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-4462 ] Ability to use RSpec without the runner Message-ID: <20061205071913.9D81A5241728@rubyforge.org> Feature Requests item #4462, was opened at 2006-05-13 04:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Suraj Kurapati (snk) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Ability to use RSpec without the runner Initial Comment: Hello, I was previously using the Ruby test/unit framework with a Ruby interpreter embedded inside a C program. In such a situation, I am unable to use an external runner program to bootstrap the Ruby interpreter, and I need the ability to work the other way around: bootstrap RSpec from within Ruby. This problem was discussed and solved (see attached file) at [ruby-talk: 192569]. Thanks for your attention. ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-05 07:18 Message: Please see the new file (updated for rSpec 0.7.2). > Do you want us to add this file to RSpec's svn? Where? Yes. Please add it to SVN as (my suggestion): lib/rspec/runner.rb If you do that, then people can use rSpec from within Ruby by writing: require 'rubygems' require 'rspec' require 'rspec/runner' context "..." do specify "..." do # ... end end ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-05-20 01:40 Message: > Do you want us to add this file to RSpec's svn? Where? Perhaps not this exact file (I'm not sure it meets your coding standards), but something similar. > How does it compare to spec.rb? spec.rb doesn't allow simply 'require'ing or 'load'ing it to use RSpec: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'rspec' => true irb(main):003:0> require 'spec' => false irb(main):004:0> load 'spec' Usage: spec [options] (FILE|DIRECTORY)+ -b, --backtrace Output full backtrace -f, --format FORMAT Output format (specdoc|s|rdoc|r) -d, --dry-run Don't execute specs -s, --spec SPECIFICATION_NAME Execute a single specification -v, --version Show version -h, --help Show this message I am looking for functionality like test/unit, where simply 'require'ing that library will bootstrap it upon exit: irb(main):001:0> require 'test/unit' => true irb(main):002:0> quit Loaded suite irb Started Finished in 0.000675 seconds. 0 tests, 0 assertions, 0 failures, 0 errors /usr/lib/ruby/1.8/irb.rb:76:in `throw': uncaught throw `IRB_EXIT' (NameError) from /usr/lib/ruby/1.8/irb.rb:76:in `irb_exit' from /usr/lib/ruby/1.8/irb/context.rb:226:in `exit' from /usr/lib/ruby/1.8/irb/extend-command.rb:24:in `exit' from /usr/lib/ruby/1.8/test/unit.rb:285 from /usr/bin/irb:13 > Can you give some more examples about how and when it's used? Please see the attached file. It is executed by a Ruby interpreter embedded inside a C program (a Verilog simulator in this case). It is essential to have the ability to bootstrap the RSpec library from within the attached file (like test/unit bootstaps itself just by being 'require'd). Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-05-18 18:50 Message: Do you want us to add this file to RSpec's svn? Where? How does it compare to spec.rb? Can you give some more examples about how and when it's used? For future reference - the ruby-talk link is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 From noreply at rubyforge.org Tue Dec 5 02:54:36 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 02:54:36 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7101 ] warning: useless use of == in void context Message-ID: <20061205075436.B364E5241728@rubyforge.org> Bugs item #7101, was opened at 2006-12-05 01:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: warning: useless use of == in void context Initial Comment: The new "should ==" syntax of rSpec (versions > 0.7.0) is causing these warnings: warning: useless use of == in void context In particular, each line of the following code causes the above warning: L0d_cache.l0d_p_rd_nack.intVal.should == 1 L0d_cache.l0d_l1_req.intVal.should == 1 Finally, I am seeing these warnings because I always run ruby with the '-w' option: 'ruby -w' Thanks for your consideration. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-05 02:54 Message: I don't think there is anything we can do about that - except for running without the -w flag. What do you think? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 From noreply at rubyforge.org Tue Dec 5 07:40:54 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 07:40:54 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-5663 ] context_setup Message-ID: <20061205124055.486995240CB3@rubyforge.org> Feature Requests item #5663, was opened at 2006-09-07 06:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5663&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Nobody (None) Summary: context_setup Initial Comment: There should be a context_setup (or similar construct) that only executes once within a given context. In fact, perhaps there could be such a thing with wider scope. The primary reason for this request has to do w/ using selenium. When you run the examples in ~/vendor/selenium, it fires up the browser once per spec. It would be nice to do that only once per run. ---------------------------------------------------------------------- Comment By: Bob Cotton (bcotton) Date: 2006-12-05 05:40 Message: This is a useful feature for defining acceptanct testing, where mocking is not an option. Additionally it would be great to allow instance variables from the context_setup to be visisble to all the specs. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-09-12 15:12 Message: Implementing this feature would potentially lead people to write specs that violate the principle of independent specs. Specs with sideffects. I've checked in a patchfile that deomstrates how to achieve a browser to be started only once. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5663&group_id=797 From dchelimsky at gmail.com Tue Dec 5 10:33:29 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 5 Dec 2006 09:33:29 -0600 Subject: [rspec-devel] new directory structure in svn Message-ID: <57c63afe0612050733o1db36ebej720e9b8c02ea4d89@mail.gmail.com> NOTE - this only applies to those who are checking out source or downloading the rspec_on_rails plugin from trunk. Hi All, The directory structure change is finished. The new location for the rspec core is: svn://rubyforge.org/var/svn/rspec/trunk/rspec The new location for the rspec_on_rails plugin is: svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugins/rspec_on_rails If you're a contributor, I'd recommend blowing away your local copy of the trunk and checking it out anew. You'll do your work on rspec core in the trunk/rspec, and the rails plugin in trunk/rspec_on_rails. Please be sure to run rake pre_commit from the root before committing (if your a committer) or submitting patches. Thanks, David From noreply at rubyforge.org Tue Dec 5 10:39:38 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 10:39:38 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061205153938.399FF52417D6@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 23:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None >Status: Closed Priority: 3 Submitted By: Pat Maddox (pergesu) >Assigned to: David Chelimsky (dchelimsky) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 15:39 Message: Done in trunk (rev 1260) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 07:10 Message: It will probably happen by mid-week. David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-03 07:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 23:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 01:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 01:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 01:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 01:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 00:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 00:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 00:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 00:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Tue Dec 5 10:55:44 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 10:55:44 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6971 ] and_yield does not work when the arity is -1 Message-ID: <20061205155544.CC6B652417D3@rubyforge.org> Bugs item #6971, was opened at 2006-11-29 23:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 >Category: mock module Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Brian Takita (btakita) >Assigned to: Brian Takita (btakita) Summary: and_yield does not work when the arity is -1 Initial Comment: def foo(bar) bar.call {|*args|} end bar = mock("bar) bar.should_receive(:call).and_yield foo(bar) # Mock 'bar' yielded || to block with arity of -1 ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 15:55 Message: Patch applied (trunk rev. 1261) ---------------------------------------------------------------------- Comment By: Brian Takita (btakita) Date: 2006-12-04 06:42 Message: I attached the patch for fix with its spec. See spec: a Mock expectation - should yield blocks that take a variable number of arguments and invoke_with_yield in message_expectation.rb ---------------------------------------------------------------------- Comment By: Brian Takita (btakita) Date: 2006-12-04 06:25 Message: Right. I feel like this should work. The block takes a variable number or arguments and I give it no arguments. In Ruby, I'm able to call a proc that has an arity of -1 with 0 arguments. proc {}.call # This works. proc {||}.call # This works. proc {||}.call(1) # This does not work. proc {|*args| }.call # This works. proc {|arg| }.call # This does not work. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-01 03:03 Message: As I understand it, this is the correct behavior: irb(main):021:0> proc {}.arity => -1 irb(main):022:0> proc {||}.arity => 0 irb(main):023:0> proc {|arg|}.arity => 1 irb(main):024:0> proc {|*args|}.arity => -1 In your example, you are yielding 0 orgs to a proc with an arity of -1. Am I missing something? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6971&group_id=797 From noreply at rubyforge.org Tue Dec 5 11:01:27 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 11:01:27 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061205160127.C787352417D6@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Tue Dec 5 11:07:23 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 11:07:23 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7038 ] View specs can't use helpers defined with helper_method Message-ID: <20061205160724.A189B52417DD@rubyforge.org> Bugs item #7038, was opened at 2006-12-04 12:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7038&group_id=797 >Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Pat Maddox (pergesu) >Assigned to: David Chelimsky (dchelimsky) Summary: View specs can't use helpers defined with helper_method Initial Comment: Assuming you have this controller: class FooController < ApplicationController helper_method :foo def foo; end end For a view spec where the view calls the foo helper method, you get an undefined method error. undefined method `foo' for #<#:0x26f71c0> edge rails, rspec 0.7.4 ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:07 Message: View specs intentionally avoid loading your controllers, therefore anything defined in them is not going to happen. Unfortunately, the helper_method method couples your controllers and helpers, which is exactly the opposite of what view specs are designed to handle. You've got (at least) 3 choices: Define foo in the FooHelper. Define foo in a module included by FooHelper and FooController. Use integrated controller specs instead of isolated view specs. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7038&group_id=797 From noreply at rubyforge.org Tue Dec 5 11:18:54 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 11:18:54 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061205161855.2155952417DB@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 16:18 Message: Ok, I certainly tried it that way. However in my setup ALL the should_render_rjs forms report: 1) NoMethodError in 'The HomeController should replace bob with 'sometext' on AJAX request to stuff' nil does not respond to `rjs' or `has_rjs?' when the should_render_rjs is called before the GET. I posted about this a few days ago on the mailing list, but haven't found an answer as to why. I am using edge rails, and to my knowledge there is nothing extra or unusual in my setup And, I discovered, the other forms of should_render_rjs do work correctly with the call after the request. I believe the two issues are orthogonal. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Tue Dec 5 11:24:12 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 11:24:12 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061205162412.9529952417DD@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:24 Message: Would you mind posting your the spec and controller code? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 16:18 Message: Ok, I certainly tried it that way. However in my setup ALL the should_render_rjs forms report: 1) NoMethodError in 'The HomeController should replace bob with 'sometext' on AJAX request to stuff' nil does not respond to `rjs' or `has_rjs?' when the should_render_rjs is called before the GET. I posted about this a few days ago on the mailing list, but haven't found an answer as to why. I am using edge rails, and to my knowledge there is nothing extra or unusual in my setup And, I discovered, the other forms of should_render_rjs do work correctly with the call after the request. I believe the two issues are orthogonal. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Tue Dec 5 12:11:30 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Dec 2006 12:11:30 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061205171131.99C0A52417F8@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 17:11 Message: I created a brand new edge rails app, using the following procedure: 281 rails rjstest 282 cd rjstest/ 283 rake rails:freeze:edge 284 script/plugin install svn://rubyforge.org/var/svn/rspec/tags/ REL_0_7_4/vendor/rspec_on_rails/vendor/plugins/rspec 289 ruby script/generate rspec_controller bob 290 mate . 292 ruby script/generate rspec 295 spec spec/controllers/bob_controller_spec.rb Both problems are demonstrated. Here is a link to an archive of it: http://www.lastmetal.com/misc/rjstest.tgz ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:24 Message: Would you mind posting your the spec and controller code? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 16:18 Message: Ok, I certainly tried it that way. However in my setup ALL the should_render_rjs forms report: 1) NoMethodError in 'The HomeController should replace bob with 'sometext' on AJAX request to stuff' nil does not respond to `rjs' or `has_rjs?' when the should_render_rjs is called before the GET. I posted about this a few days ago on the mailing list, but haven't found an answer as to why. I am using edge rails, and to my knowledge there is nothing extra or unusual in my setup And, I discovered, the other forms of should_render_rjs do work correctly with the call after the request. I believe the two issues are orthogonal. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From dchelimsky at gmail.com Wed Dec 6 21:12:54 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 6 Dec 2006 20:12:54 -0600 Subject: [rspec-devel] more directory change info Message-ID: <57c63afe0612061812g98ac0f1k50752143a2331363@mail.gmail.com> Hi all, After a few problems arose this week from the restructuring earlier in the week, we restructured things again. This will ONLY affect those of you doing development on rspec through patches or committing. ================================ Database options There is now support for either sqlite or mysql for the rspec_on_rails specs. To get things rolling, check out a new copy of trunk and ... For sqlite: $ cd trunk/rspec_on_rails $ rake rake rspec:generate_sqlite_config $ cd .. $ rake pre_commit For mysql: $ cd trunk/rspec_on_rails $ rake rspec:generate_mysql_config $ mysql -u root -p password: (enter your password) mysql> source db/mysql_setup.sql; mysql> exit; $ cd .. $ rake pre_commit Once you do this, you should never have to set this up again unless you check out a fresh copy of trunk. NOTE that there is also a teardown script for mysql if you want to get rid of the users and databases: $ cd trunk/rspec_on_rails $ mysql -u root -p password: (enter your password) mysql> source db/mysql_teardown.sql; ================================ Rails app There is once again a single rails project with a sample app as well as the generic specs. Run "rake --tasks" from the root and from ~/rspec_on_rails to get a sense of what's going on. ================================ Happy spec'ing. Cheers, David From noreply at rubyforge.org Thu Dec 7 01:00:33 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 7 Dec 2006 01:00:33 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7143 ] Spec::Runner::ContextRunner doesn't always return exit code Message-ID: <20061207060033.E94DA5241DE1@rubyforge.org> Bugs item #7143, was opened at 2006-12-06 23:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Chad Woolley (thewoolleyman) Assigned to: Nobody (None) Summary: Spec::Runner::ContextRunner doesn't always return exit code Initial Comment: Spec::Runner::ContextRunner.run doesn't return a valid exit code if 'exit_when_done' is false. FIX: Simply add 'exit_code' as the last line of the 'run' method. This is a one-liner, let me know if you need a patch. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 From noreply at rubyforge.org Thu Dec 7 04:28:06 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 7 Dec 2006 04:28:06 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7145 ] Hint for subversion users Message-ID: <20061207092806.9C0D25241DE1@rubyforge.org> Bugs item #7145, was opened at 2006-12-07 10:28 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7145&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Stefan Saasen (attachr) Assigned to: Nobody (None) Summary: Hint for subversion users Initial Comment: Hi, the revision based version information used in vendor/plugins/rspec/lib/spec/rails/version.rb causes trouble if subversion is used to manage the rails application. If svn:keywords is set to "Revision" on version.rb the Revision is updated to the local revision. This causes the rspec on rails plugin to fail. Maybe you can add a hint to the documentation to either disable svn:keywords (Revision) on version.rb or to manually change the REV constant to the original revision (1201 for the 0.7.4 plugin). best regards stefan saasen ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7145&group_id=797 From noreply at rubyforge.org Thu Dec 7 07:57:22 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 7 Dec 2006 07:57:22 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7143 ] Spec::Runner::ContextRunner doesn't always return exit code Message-ID: <20061207125723.00E795240F25@rubyforge.org> Bugs item #7143, was opened at 2006-12-07 06:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Chad Woolley (thewoolleyman) Assigned to: Nobody (None) Summary: Spec::Runner::ContextRunner doesn't always return exit code Initial Comment: Spec::Runner::ContextRunner.run doesn't return a valid exit code if 'exit_when_done' is false. FIX: Simply add 'exit_code' as the last line of the 'run' method. This is a one-liner, let me know if you need a patch. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-07 12:57 Message: A patch *with a spec* would be great! Thanks, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 From noreply at rubyforge.org Thu Dec 7 10:28:34 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 7 Dec 2006 10:28:34 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6541 ] catch-22 using named routes Message-ID: <20061207152834.A741452411F3@rubyforge.org> Bugs item #6541, was opened at 2006-11-07 09:39 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6541&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: catch-22 using named routes Initial Comment: The recommended way specify controller redirects is to use controller.should_redirect_to 'path or hash' *before* calling the action. However, you cannot use named routes (XXX_url) until the action has been called (it gives 'rewrite' undefined for nil when it tries to call an instance variable in the controller). Can the mock be improved sufficiently to allow named routes to work in advance of the action? One workaround is to instantiate an ActionController::Integration::Session and delegate the named routes to that. ---------------------------------------------------------------------- Comment By: Brandon Keepers (brandon) Date: 2006-12-07 10:28 Message: Does anyone have any suggestions for a workaround for this? I tried sending :initialize_current_url to my controller in the setup and that doesn't seem to do anything. ---------------------------------------------------------------------- Comment By: Jerry West (jjw) Date: 2006-11-07 16:37 Message: PS: def redirect controller.url_for(response.redirected_to) end # that's because named routes return the path. While should_redirect_to takes paths, response.redirected_to is a Hash. Yes, I know, I know, I've just found out about should_have_redirected_to or whatever it is. I'm still coming to grips with the new equality rules and latest functionality! ---------------------------------------------------------------------- Comment By: Jerry West (jjw) Date: 2006-11-07 16:25 Message: Sorry, failing spec as requested... ---------------------------------------------------------- require File.dirname(__FILE__) + '/../spec_helper' # just so we have something to test class TestController < ApplicationController def index render :text => 'testing' # don't look for view end end # probably redundant with 0.7? context "All controllers (via ApplicationController)" do controller_name :test specify 'should redirect to login if protected page sought and not logged in' do controller.should_redirect_to login_url get :index controller.should_not_be_logged_in redirect.should == login_url end end ---------------------------------------------------------- spec -fs spec/controllers/application_controller_spec.rb /home/jjw/work/northants/config/environment.rb:31: warning: already initialized constant RAILS_CONNECTION_ADAPTERS Creating sqlite in memory database... All controllers (via ApplicationController) - should redirect to login if protected page sought and not logged in (FAILED - 1) 1) NoMethodError in 'All controllers (via ApplicationController) should redirect to login if protected page sought and not logged in' You have a nil object when you didn't expect it! The error occured while evaluating nil.rewrite generated/routing/named_routes/login.rb:2:in `login_url' ./spec/controllers/application_controller_spec.rb:17:in `should redirect to login if protected page sought and not logged in' Finished in 0.004108 seconds 1 specification, 1 failure --------------------------------------------------------- commenting out the offending 'should_redirect_to' shows that the code itself is fine and login_url valid after the call to get:- All controllers (via ApplicationController) - should redirect to login if protected page sought and not logged in Finished in 0.006735 seconds 1 specification, 0 failures ---------------------------------------------------------- Examining the code for ActionController::Base shows that the nil value is an unset instance variable (@url). There is a method 'initialize_current_url' (line 927) which passes @request and @params to UrlRewriter.new, if that's any help. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-07 12:46 Message: Could you please attach a failing spec as explained here? http://rspec.rubyforge.org/contribute.html ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6541&group_id=797 From noreply at rubyforge.org Thu Dec 7 11:05:49 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 7 Dec 2006 11:05:49 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6541 ] catch-22 using named routes Message-ID: <20061207160549.A6FC3524117D@rubyforge.org> Bugs item #6541, was opened at 2006-11-07 14:39 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6541&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: catch-22 using named routes Initial Comment: The recommended way specify controller redirects is to use controller.should_redirect_to 'path or hash' *before* calling the action. However, you cannot use named routes (XXX_url) until the action has been called (it gives 'rewrite' undefined for nil when it tries to call an instance variable in the controller). Can the mock be improved sufficiently to allow named routes to work in advance of the action? One workaround is to instantiate an ActionController::Integration::Session and delegate the named routes to that. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-07 16:05 Message: I'd say you should set your expectations post-action: response.should_be_redirect response.redirect_url.should == my_named_url ---------------------------------------------------------------------- Comment By: Brandon Keepers (brandon) Date: 2006-12-07 15:28 Message: Does anyone have any suggestions for a workaround for this? I tried sending :initialize_current_url to my controller in the setup and that doesn't seem to do anything. ---------------------------------------------------------------------- Comment By: Jerry West (jjw) Date: 2006-11-07 21:37 Message: PS: def redirect controller.url_for(response.redirected_to) end # that's because named routes return the path. While should_redirect_to takes paths, response.redirected_to is a Hash. Yes, I know, I know, I've just found out about should_have_redirected_to or whatever it is. I'm still coming to grips with the new equality rules and latest functionality! ---------------------------------------------------------------------- Comment By: Jerry West (jjw) Date: 2006-11-07 21:25 Message: Sorry, failing spec as requested... ---------------------------------------------------------- require File.dirname(__FILE__) + '/../spec_helper' # just so we have something to test class TestController < ApplicationController def index render :text => 'testing' # don't look for view end end # probably redundant with 0.7? context "All controllers (via ApplicationController)" do controller_name :test specify 'should redirect to login if protected page sought and not logged in' do controller.should_redirect_to login_url get :index controller.should_not_be_logged_in redirect.should == login_url end end ---------------------------------------------------------- spec -fs spec/controllers/application_controller_spec.rb /home/jjw/work/northants/config/environment.rb:31: warning: already initialized constant RAILS_CONNECTION_ADAPTERS Creating sqlite in memory database... All controllers (via ApplicationController) - should redirect to login if protected page sought and not logged in (FAILED - 1) 1) NoMethodError in 'All controllers (via ApplicationController) should redirect to login if protected page sought and not logged in' You have a nil object when you didn't expect it! The error occured while evaluating nil.rewrite generated/routing/named_routes/login.rb:2:in `login_url' ./spec/controllers/application_controller_spec.rb:17:in `should redirect to login if protected page sought and not logged in' Finished in 0.004108 seconds 1 specification, 1 failure --------------------------------------------------------- commenting out the offending 'should_redirect_to' shows that the code itself is fine and login_url valid after the call to get:- All controllers (via ApplicationController) - should redirect to login if protected page sought and not logged in Finished in 0.006735 seconds 1 specification, 0 failures ---------------------------------------------------------- Examining the code for ActionController::Base shows that the nil value is an unset instance variable (@url). There is a method 'initialize_current_url' (line 927) which passes @request and @params to UrlRewriter.new, if that's any help. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-07 17:46 Message: Could you please attach a failing spec as explained here? http://rspec.rubyforge.org/contribute.html ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6541&group_id=797 From bob.cotton at rallydev.com Thu Dec 7 17:15:44 2006 From: bob.cotton at rallydev.com (Bob Cotton) Date: Thu, 07 Dec 2006 15:15:44 -0700 Subject: [rspec-devel] [#5663] context_setup Message-ID: [ Posting comments on rubyforge seems to be broken ] The patch to the selenium and watir tests shows using class vars to conditionally do "context_setup" stuff. This falls down when you use the same class var across multiple contexts, because context share the same class, the class var is already defined in the second context. Is context_setup something that will ever make it into rspec? I've hacked up a working example. It executes context_setup and context_teardown in it's own execution context, then copies any instance vars from context_setup into each spec's execution context. I can submit a patch, complete with specs, if you think it could be included. Otherwise I won't spend the time to fully spec it. The heart of the matter looks like this: module Spec::Runner::Context::InstanceMethods def run(reporter, dry_run=false) reporter.add_context(@name) prepare_execution_context_class unless context_setup_block.nil? || dry_run execution_context_instance = execution_context(nil) execution_context_instance.instance_exec(&context_setup_block) end specifications.each do |specification| specification_execution_context = execution_context(specification) specification_execution_context.copy_instance_variables_from(execution_context_instance, [:@spec]) unless context_setup_block.nil? specification.run(reporter, setup_block, teardown_block, dry_run, specification_execution_context) end # What happens when no contect_setup, but a context_teardown? unless context_teardown_block.nil? || dry_run execution_context_instance.instance_exec(&context_teardown_block) end end Thoughts? - Bob -- Bob Cotton Test Architect -- Rally Software -- rallydev.com http://www.testarchitecture.com/blog From aslak.hellesoy at gmail.com Thu Dec 7 18:22:18 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 8 Dec 2006 00:22:18 +0100 Subject: [rspec-devel] [#5663] context_setup In-Reply-To: References: Message-ID: <8d961d900612071522s7f7f0844w9052d84f6eb29b59@mail.gmail.com> On 12/7/06, Bob Cotton wrote: > > [ Posting comments on rubyforge seems to be broken ] > > The patch to the selenium and watir tests shows using class vars to > conditionally do "context_setup" stuff. > > This falls down when you use the same class var across multiple > contexts, because context share the same class, the class var is > already defined in the second context. > > Is context_setup something that will ever make it into rspec? > I'm for it. > I've hacked up a working example. It executes context_setup and > context_teardown in it's own execution context, then copies any > instance vars from context_setup into each spec's execution context. > copy_instance_variables_from is an active_support method, which we don't want to depend upon from RSpec core. http://dev.rubyonrails.org/changeset/3113 However, it's a small method and can easily be copied. > I can submit a patch, complete with specs, if you think it could be > included. Otherwise I won't spend the time to fully spec it. > There is no better way to get a patch applied than doing exactly what you suggest. And it's a welcome feature. It's argueably a no-no for purists (it introduces dependencies between specs), but we have to be pragmatic too. > The heart of the matter looks like this: > > module Spec::Runner::Context::InstanceMethods > def run(reporter, dry_run=false) > reporter.add_context(@name) > > prepare_execution_context_class > > unless context_setup_block.nil? || dry_run > execution_context_instance = execution_context(nil) > execution_context_instance.instance_exec(&context_setup_block) > end > > specifications.each do |specification| > specification_execution_context = execution_context(specification) > specification_execution_context.copy_instance_variables_from(execution_context_instance, [:@spec]) unless context_setup_block.nil? > specification.run(reporter, setup_block, teardown_block, dry_run, specification_execution_context) > end > > # What happens when no contect_setup, but a context_teardown? > unless context_teardown_block.nil? || dry_run > execution_context_instance.instance_exec(&context_teardown_block) > end > end > > > Thoughts? > Looks good. If you can attach a patch to the issue in question and make sure the default rake task passes (stand in trunk/rspec) then I'll look at it asap. Beware that coverage has to be 100% or rake will fail. Cheers, Aslak > - Bob > > -- > Bob Cotton > Test Architect -- Rally Software -- rallydev.com > http://www.testarchitecture.com/blog > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Thu Dec 7 21:27:50 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 7 Dec 2006 21:27:50 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6112 ] Rspec on Rails: Postgresql reports WARNING: there is already a transaction in progress Message-ID: <20061208022750.253295241E45@rubyforge.org> Bugs item #6112, was opened at 2006-10-12 14:35 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6112&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Lee (davidlee) Assigned to: Nobody (None) Summary: Rspec on Rails: Postgresql reports WARNING: there is already a transaction in progress Initial Comment: This has been verified on Arch Linux (gimmick) and OS X Tiger (postgres 8.1 via darwinports), using Rails 1.1.2 and RSpec 0.6.4 & the rspec rails plugin. Description (output from skeletal rails project): /tmp/foo % spec spec/models/tester_spec.rb WARNING: there is already a transaction in progress WARNING: there is no transaction in progress .WARNING: there is already a transaction in progress WARNING: there is no transaction in progress F 1) Spec::Expectations::ExpectationNotMetError in 'Tester class with fixtures loaded should have more specifications' not enough specs ./spec/models/tester_spec.rb:11:in `should have more specifications' Finished in 0.326214 seconds 2 specifications, 1 failure ____ 2 lines of warnings are generated per specify block. When running a substantial spec, voluminous WARNINGs are generated, such that it is necessary to run spec spec/models/* 2> /dev/null to prevent the test output being lost in noise. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 02:27 Message: David - is this still a problem with 0.7.4? Things have changed quite a bit since 0.6. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6112&group_id=797 From leepope at gmail.com Fri Dec 8 02:23:09 2006 From: leepope at gmail.com (Lee Pope) Date: Thu, 7 Dec 2006 23:23:09 -0800 Subject: [rspec-devel] RSpec stepping on Test::Unit? Message-ID: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> Hi all, and thanks for such a great tool! I have some new functionality that I'm adding to an existing rails app. I wanted to start migrating my tests to RSpec, so i installed the gem and rails plugin (versions match). My specs all run, (very well, thank you), but my existing unit, funtional and integration tests, while they seem to be running, produce no output. If i remove the plugin from the vendor/plugin directory, the output from the tests is normal. Here is a sample of the command line output, in case it is helpful: lee at manso:~/projects/rails/LP-message-spam$ rake (in /home/lee/projects/rails/LP-message-spam) /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" "test/unit/region_test.rb" "test/unit/trip_test.rb" "test/unit/user_test.rb" "test/unit/itin_test.rb" "test/unit/region_interest_test.rb" "test/unit/region_type_test.rb" "test/unit/session_test.rb" "test/unit/contact_log_test.rb" /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" "test/functional/contact_log_controller_test.rb" "test/functional/user_controller_test.rb" "test/functional/visit_controller_test.rb" "test/functional/files_controller_test.rb" "test/functional/application_controller_test.rb" /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" "test/integration/application_test.rb" "test/integration/download_test.rb" "test/integration/catalog_test.rb" "test/integration/newsletter_test.rb" /usr/bin/ruby1.8 -I"/usr/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" "/usr/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" "spec/controllers/auth_spec.rb" "spec/controllers/application_controller_spec.rb" -c -f s Setup and DSL: - set_auth_cookie should drop a cookie for the returning user New User: - should not have a cookie - should not be able to use email-bypass Returning User: - should have a cookie - should be in the session after their first request Anonymous User - should not have a cookie when they arrive - should get a cookie when they give their email Authentication: Finished in 0.923852 seconds 7 specifications, 0 failures I have searched this list, and the rails list, to no avail. Can anybody help me? Thanks, Lee -- ********************************* All that is gold does not glitter. Not all those who wander are lost. The old who are strong do not whither. Deep roots are not touched by the frost. -- J.R.R. Tolkein -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20061207/d3f102d7/attachment.html From aslak.hellesoy at gmail.com Fri Dec 8 09:24:23 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Fri, 8 Dec 2006 08:24:23 -0600 Subject: [rspec-devel] RSpec stepping on Test::Unit? In-Reply-To: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> References: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> Message-ID: <8d961d900612080624n486c0fc0o30e1670195f907f9@mail.gmail.com> Short answer : yes rspec is overriding some test unit stuff to silence it. This is because we're reusing fixture etc code from rails, which is tightly coupled to testunut, which once loaded insists on making a lot of noise. the method we're overriding is run, but i don't remember what file. Don't have the code here. On 12/8/06, Lee Pope wrote: > Hi all, and thanks for such a great tool! > > I have some new functionality that I'm adding to an existing rails app. I > wanted to start migrating my tests to RSpec, so i installed the gem and > rails plugin (versions match). > > My specs all run, (very well, thank you), but my existing unit, funtional > and integration tests, while they seem to be running, produce no output. If > i remove the plugin from the vendor/plugin directory, the output from the > tests is normal. Here is a sample of the command line output, in case it is > helpful: > > lee at manso:~/projects/rails/LP-message-spam$ rake > (in /home/lee/projects/rails/LP-message-spam) > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" > "test/unit/region_test.rb" "test/unit/trip_test.rb" "test/unit/user_test.rb" > "test/unit/itin_test.rb" "test/unit/region_interest_test.rb" > "test/unit/region_type_test.rb" "test/unit/session_test.rb" > "test/unit/contact_log_test.rb" > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" > "test/functional/contact_log_controller_test.rb" > "test/functional/user_controller_test.rb" > "test/functional/visit_controller_test.rb" > "test/functional/files_controller_test.rb" > "test/functional/application_controller_test.rb" > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" > "test/integration/application_test.rb" "test/integration/download_test.rb" > "test/integration/catalog_test.rb" "test/integration/newsletter_test.rb" > /usr/bin/ruby1.8 -I"/usr/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" > "/usr/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" > "spec/controllers/auth_spec.rb" > "spec/controllers/application_controller_spec.rb" -c -f s > > Setup and DSL: > - set_auth_cookie should drop a cookie for the returning user > > New User: > - should not have a cookie > - should not be able to use email-bypass > > Returning User: > - should have a cookie > - should be in the session after their first request > > Anonymous User > - should not have a cookie when they arrive > - should get a cookie when they give their email > > Authentication: > > Finished in 0.923852 seconds > > 7 specifications, 0 failures > > I have searched this list, and the rails list, to no avail. > > Can anybody help me? > > Thanks, > > Lee > -- > > ********************************* > > All that is gold does not glitter. > Not all those who wander are lost. > The old who are strong do not whither. > Deep roots are not touched by the frost. > -- J.R.R. Tolkein > > From dchelimsky at gmail.com Fri Dec 8 09:30:50 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 8 Dec 2006 08:30:50 -0600 Subject: [rspec-devel] RSpec stepping on Test::Unit? In-Reply-To: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> References: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> Message-ID: <57c63afe0612080630i3f8e610dwb8b2b6d40178aff4@mail.gmail.com> On 12/8/06, Lee Pope wrote: > Hi all, and thanks for such a great tool! You're welcome. > I have some new functionality that I'm adding to an existing rails app. I > wanted to start migrating my tests to RSpec, so i installed the gem and > rails plugin (versions match). > > My specs all run, (very well, thank you), but my existing unit, funtional > and integration tests, while they seem to be running, produce no output. Go into vendor/plugins/rspec/init.rb and delete everything in there (leave it blank). That should solve the problem. I'm not sure yet what it is about rspec that's causing this to happen, but the init file is duplicating a require that happens in spec/spec_helper.rb, so it's not necessary. I'll be committing this a little later, so it will be part of the next release. Cheers, David > If > i remove the plugin from the vendor/plugin directory, the output from the > tests is normal. Here is a sample of the command line output, in case it is > helpful: > > lee at manso:~/projects/rails/LP-message-spam$ rake > (in /home/lee/projects/rails/LP-message-spam) > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" > "test/unit/region_test.rb" "test/unit/trip_test.rb" "test/unit/user_test.rb" > "test/unit/itin_test.rb" > "test/unit/region_interest_test.rb" > "test/unit/region_type_test.rb" "test/unit/session_test.rb" > "test/unit/contact_log_test.rb" > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" > "test/functional/contact_log_controller_test.rb" > "test/functional/user_controller_test.rb" > "test/functional/visit_controller_test.rb" > "test/functional/files_controller_test.rb" > "test/functional/application_controller_test.rb" > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" > "test/integration/application_test.rb" > "test/integration/download_test.rb" > "test/integration/catalog_test.rb" > "test/integration/newsletter_test.rb" > /usr/bin/ruby1.8 > -I"/usr/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" > "/usr/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" > "spec/controllers/auth_spec.rb" > "spec/controllers/application_controller_spec.rb" -c -f s > > Setup and DSL: > - set_auth_cookie should drop a cookie for the returning user > > New User: > - should not have a cookie > - should not be able to use email-bypass > > Returning User: > - should have a cookie > - should be in the session after their first request > > Anonymous User > - should not have a cookie when they arrive > - should get a cookie when they give their email > > Authentication: > > Finished in 0.923852 seconds > > 7 specifications, 0 failures > > I have searched this list, and the rails list, to no avail. > > Can anybody help me? > > Thanks, > > Lee > -- > > ********************************* > > All that is gold does not glitter. > Not all those who wander are lost. > The old who are strong do not whither. > Deep roots are not touched by the frost. > -- J.R.R. Tolkein > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > > From leepope at gmail.com Fri Dec 8 11:25:05 2006 From: leepope at gmail.com (Lee Pope) Date: Fri, 8 Dec 2006 08:25:05 -0800 Subject: [rspec-devel] RSpec stepping on Test::Unit? Message-ID: <8ac8b2310612080825s350ebc5ep7318e223db5b7b62@mail.gmail.com> (I forgot to cc myself, and am not subscribed to the list -- gotta fix that asap) Thanks, David -- removing the extra from init.rb fixed the problem. Now I have a lot of work to do, converting my tests! lee -- ********************************* All that is gold does not glitter. Not all those who wander are lost. The old who are strong do not whither. Deep roots are not touched by the frost. -- J.R.R. Tolkein -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20061208/9b7beee6/attachment.html From noreply at rubyforge.org Fri Dec 8 14:42:28 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 8 Dec 2006 14:42:28 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7179 ] script/generate rspec_resource generates incorrect helper name Message-ID: <20061208194229.46AE95241307@rubyforge.org> Bugs item #7179, was opened at 2006-12-08 12:42 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7179&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Martin Emde (zraii) Assigned to: Nobody (None) Summary: script/generate rspec_resource generates incorrect helper name Initial Comment: RSpec on Rails generates the wrong helper name, using the singular instead of the plural for the actual name of the module: PersonHelper instead of PeopleHelper RSpec/RSpec on rails version 0.7.4 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7179&group_id=797 From noreply at rubyforge.org Fri Dec 8 15:25:57 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 8 Dec 2006 15:25:57 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7179 ] script/generate rspec_resource generates incorrect helper name Message-ID: <20061208202557.E44C4524106F@rubyforge.org> Bugs item #7179, was opened at 2006-12-08 19:42 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7179&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Martin Emde (zraii) Assigned to: Nobody (None) Summary: script/generate rspec_resource generates incorrect helper name Initial Comment: RSpec on Rails generates the wrong helper name, using the singular instead of the plural for the actual name of the module: PersonHelper instead of PeopleHelper RSpec/RSpec on rails version 0.7.4 ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 20:25 Message: A lot of stuff gets generated, some by RSpec and some by Rails. Can you be more specific about what file you're seeing this in? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7179&group_id=797 From pergesu at gmail.com Fri Dec 8 16:12:18 2006 From: pergesu at gmail.com (Pat Maddox) Date: Fri, 8 Dec 2006 14:12:18 -0700 Subject: [rspec-devel] RSpec stepping on Test::Unit? In-Reply-To: <57c63afe0612080630i3f8e610dwb8b2b6d40178aff4@mail.gmail.com> References: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> <57c63afe0612080630i3f8e610dwb8b2b6d40178aff4@mail.gmail.com> Message-ID: <810a540e0612081312j5cb48856s906a2b0517c8b69e@mail.gmail.com> On 12/8/06, David Chelimsky wrote: > On 12/8/06, Lee Pope wrote: > > Hi all, and thanks for such a great tool! > > You're welcome. > > > I have some new functionality that I'm adding to an existing rails app. I > > wanted to start migrating my tests to RSpec, so i installed the gem and > > rails plugin (versions match). > > > > My specs all run, (very well, thank you), but my existing unit, funtional > > and integration tests, while they seem to be running, produce no output. > > Go into vendor/plugins/rspec/init.rb and delete everything in there > (leave it blank). That should solve the problem. I'm not sure yet what > it is about rspec that's causing this to happen, but the init file is > duplicating a require that happens in spec/spec_helper.rb, so it's not > necessary. > > I'll be committing this a little later, so it will be part of the next release. Doing that will load the RSpec environment in the development and production environments though, which shouldn't happen. Pat From dchelimsky at gmail.com Fri Dec 8 16:16:37 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 8 Dec 2006 15:16:37 -0600 Subject: [rspec-devel] RSpec stepping on Test::Unit? In-Reply-To: <810a540e0612081312j5cb48856s906a2b0517c8b69e@mail.gmail.com> References: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> <57c63afe0612080630i3f8e610dwb8b2b6d40178aff4@mail.gmail.com> <810a540e0612081312j5cb48856s906a2b0517c8b69e@mail.gmail.com> Message-ID: <57c63afe0612081316i7a7cdc62i2148439b9f657df7@mail.gmail.com> On 12/8/06, Pat Maddox wrote: > On 12/8/06, David Chelimsky wrote: > > On 12/8/06, Lee Pope wrote: > > > Hi all, and thanks for such a great tool! > > > > You're welcome. > > > > > I have some new functionality that I'm adding to an existing rails app. I > > > wanted to start migrating my tests to RSpec, so i installed the gem and > > > rails plugin (versions match). > > > > > > My specs all run, (very well, thank you), but my existing unit, funtional > > > and integration tests, while they seem to be running, produce no output. > > > > Go into vendor/plugins/rspec/init.rb and delete everything in there > > (leave it blank). That should solve the problem. I'm not sure yet what > > it is about rspec that's causing this to happen, but the init file is > > duplicating a require that happens in spec/spec_helper.rb, so it's not > > necessary. > > > > I'll be committing this a little later, so it will be part of the next release. > > Doing that will load the RSpec environment in the development and > production environments though, which shouldn't happen. Agreed it shouldn't happen. Why do you say it will? > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From pergesu at gmail.com Fri Dec 8 16:32:05 2006 From: pergesu at gmail.com (Pat Maddox) Date: Fri, 8 Dec 2006 14:32:05 -0700 Subject: [rspec-devel] RSpec stepping on Test::Unit? In-Reply-To: <57c63afe0612081316i7a7cdc62i2148439b9f657df7@mail.gmail.com> References: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> <57c63afe0612080630i3f8e610dwb8b2b6d40178aff4@mail.gmail.com> <810a540e0612081312j5cb48856s906a2b0517c8b69e@mail.gmail.com> <57c63afe0612081316i7a7cdc62i2148439b9f657df7@mail.gmail.com> Message-ID: <810a540e0612081332t507c74e1l5db9c48bd9182994@mail.gmail.com> On 12/8/06, David Chelimsky wrote: > On 12/8/06, Pat Maddox wrote: > > On 12/8/06, David Chelimsky wrote: > > > On 12/8/06, Lee Pope wrote: > > > > Hi all, and thanks for such a great tool! > > > > > > You're welcome. > > > > > > > I have some new functionality that I'm adding to an existing rails app. I > > > > wanted to start migrating my tests to RSpec, so i installed the gem and > > > > rails plugin (versions match). > > > > > > > > My specs all run, (very well, thank you), but my existing unit, funtional > > > > and integration tests, while they seem to be running, produce no output. > > > > > > Go into vendor/plugins/rspec/init.rb and delete everything in there > > > (leave it blank). That should solve the problem. I'm not sure yet what > > > it is about rspec that's causing this to happen, but the init file is > > > duplicating a require that happens in spec/spec_helper.rb, so it's not > > > necessary. > > > > > > I'll be committing this a little later, so it will be part of the next release. > > > > Doing that will load the RSpec environment in the development and > > production environments though, which shouldn't happen. > > Agreed it shouldn't happen. Why do you say it will? You're right, it won't, because the code will only be loaded in when one of the specs requires spec_helper.rb. Crazy as this sounds...I just woke up :) Pat From dchelimsky at gmail.com Fri Dec 8 16:40:35 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 8 Dec 2006 15:40:35 -0600 Subject: [rspec-devel] RSpec stepping on Test::Unit? In-Reply-To: <810a540e0612081332t507c74e1l5db9c48bd9182994@mail.gmail.com> References: <8ac8b2310612072323x1937fed0r70aa648746341ead@mail.gmail.com> <57c63afe0612080630i3f8e610dwb8b2b6d40178aff4@mail.gmail.com> <810a540e0612081312j5cb48856s906a2b0517c8b69e@mail.gmail.com> <57c63afe0612081316i7a7cdc62i2148439b9f657df7@mail.gmail.com> <810a540e0612081332t507c74e1l5db9c48bd9182994@mail.gmail.com> Message-ID: <57c63afe0612081340t2a24152ch1ef54a26b92ff6af@mail.gmail.com> On 12/8/06, Pat Maddox wrote: > On 12/8/06, David Chelimsky wrote: > > On 12/8/06, Pat Maddox wrote: > > > On 12/8/06, David Chelimsky wrote: > > > > On 12/8/06, Lee Pope wrote: > > > > > Hi all, and thanks for such a great tool! > > > > > > > > You're welcome. > > > > > > > > > I have some new functionality that I'm adding to an existing rails app. I > > > > > wanted to start migrating my tests to RSpec, so i installed the gem and > > > > > rails plugin (versions match). > > > > > > > > > > My specs all run, (very well, thank you), but my existing unit, funtional > > > > > and integration tests, while they seem to be running, produce no output. > > > > > > > > Go into vendor/plugins/rspec/init.rb and delete everything in there > > > > (leave it blank). That should solve the problem. I'm not sure yet what > > > > it is about rspec that's causing this to happen, but the init file is > > > > duplicating a require that happens in spec/spec_helper.rb, so it's not > > > > necessary. > > > > > > > > I'll be committing this a little later, so it will be part of the next release. > > > > > > Doing that will load the RSpec environment in the development and > > > production environments though, which shouldn't happen. > > > > Agreed it shouldn't happen. Why do you say it will? > > You're right, it won't, because the code will only be loaded in when > one of the specs requires spec_helper.rb. Crazy as this sounds...I > just woke up :) Good morning, then. > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Fri Dec 8 17:00:32 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 8 Dec 2006 17:00:32 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6807 ] port assert_select Message-ID: <20061208220032.45C4D524137D@rubyforge.org> Feature Requests item #6807, was opened at 2006-11-21 19:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6807&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Nobody (None) Summary: port assert_select Initial Comment: Add an rspec implementation of assert_select. Need to decide whether to just duplicate existing API (using repsonse.should_have?????) or actually devise a more integrated API like this: repsonse.should_include(:form).with(:action => "blah") or response.should_include(:form).with do |form| form.should_include(:input).with(:name => 'age', :type => 'text') end or some such. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 22:00 Message: I checked in a preliminary port (rev 1276). It only works w/ 1.1.6 right now, but it works just like assert_select for everything except rjs: response.should_have (for tags w/ x-path like syntax) response.should_have_encoded response.should_have_email response.should_have_feed Remaining TODO: Get it to work w/ 1.2.0 and edge Figure out what to do about rjs (need a name other than should_have_rjs) Clean up the docs ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-22 13:00 Message: Josh - a plugin would be great. Could you use should_have instead of should_select (which doesn't really mean anything in this context): response.should_have "form>input[name=age][type=text]" I'm assuming you've got this implemented on ResponseBody, so there should be no conflict w/ Should#have. ---------------------------------------------------------------------- Comment By: Josh Chisholm (joshchisholm) Date: 2006-11-22 09:48 Message: I implemented a basic response.should_select by mixing in scrAPI. Haven't brought it up to date with rspec 0.72 yet, but I will if someone advises the best way to do so (assuming we don't want a scrAPI dependency in rspec core? - a plugin??). > The third seems to promote really detailed expectations about the HTML, and I think that way lies madness. If I understand correcly the second example implies the form has a child (somewhere unspecified) with certain specified attributes. I don't find this too detailed and if I remember correctly this can be done with a single selector: response.should_select "form>input[name=age][type=text]" This syntax is all I have needed so far. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-21 22:43 Message: I like the: repsonse.should_include(:form).with(:action => "blah") version, myself. The third seems to promote really detailed expectations about the HTML, and I think that way lies madness. If someone writes the specs for it, I will code it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6807&group_id=797 From noreply at rubyforge.org Fri Dec 8 17:00:42 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 8 Dec 2006 17:00:42 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6807 ] port assert_select Message-ID: <20061208220042.C8FB15241377@rubyforge.org> Feature Requests item #6807, was opened at 2006-11-21 19:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6807&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) >Assigned to: David Chelimsky (dchelimsky) Summary: port assert_select Initial Comment: Add an rspec implementation of assert_select. Need to decide whether to just duplicate existing API (using repsonse.should_have?????) or actually devise a more integrated API like this: repsonse.should_include(:form).with(:action => "blah") or response.should_include(:form).with do |form| form.should_include(:input).with(:name => 'age', :type => 'text') end or some such. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 22:00 Message: I checked in a preliminary port (rev 1276). It only works w/ 1.1.6 right now, but it works just like assert_select for everything except rjs: response.should_have (for tags w/ x-path like syntax) response.should_have_encoded response.should_have_email response.should_have_feed Remaining TODO: Get it to work w/ 1.2.0 and edge Figure out what to do about rjs (need a name other than should_have_rjs) Clean up the docs ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-22 13:00 Message: Josh - a plugin would be great. Could you use should_have instead of should_select (which doesn't really mean anything in this context): response.should_have "form>input[name=age][type=text]" I'm assuming you've got this implemented on ResponseBody, so there should be no conflict w/ Should#have. ---------------------------------------------------------------------- Comment By: Josh Chisholm (joshchisholm) Date: 2006-11-22 09:48 Message: I implemented a basic response.should_select by mixing in scrAPI. Haven't brought it up to date with rspec 0.72 yet, but I will if someone advises the best way to do so (assuming we don't want a scrAPI dependency in rspec core? - a plugin??). > The third seems to promote really detailed expectations about the HTML, and I think that way lies madness. If I understand correcly the second example implies the form has a child (somewhere unspecified) with certain specified attributes. I don't find this too detailed and if I remember correctly this can be done with a single selector: response.should_select "form>input[name=age][type=text]" This syntax is all I have needed so far. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-21 22:43 Message: I like the: repsonse.should_include(:form).with(:action => "blah") version, myself. The third seems to promote really detailed expectations about the HTML, and I think that way lies madness. If someone writes the specs for it, I will code it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6807&group_id=797 From dchelimsky at gmail.com Fri Dec 8 17:19:11 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 8 Dec 2006 16:19:11 -0600 Subject: [rspec-devel] port of assert_select Message-ID: <57c63afe0612081419s2cd9f810tda7c0aa1103d73bb@mail.gmail.com> Hi everyone, I just checked in a preliminary port of assert_select for rspec_on_rails. It only works w/ 1.1.6 so far and you have to have the assert_select plugin installed for it to work. It uses the following syntax: response.should_have (accepts same args as assert_select) response.should_have_encoded (accepts same args as assert_select_encoded) response.should_have_email (accepts same args as assert_select_email) response.should_have_feed (accepts same args as assert_select_feed) I'd like to add the rjs support and I'd like to use should_have_rjs, but we already have that and it uses different syntax. I'd like to deprecate it in favor of this port, because assert_select is actually something built into rails testing already (>= 1.2.0). I'm thinking we could rename should_have_tag and should_have_rjs to should_render_xxx or should_include_xxx. That would make for a simple search/replace for those who already have specs w/ those and allows us to use should_have_xxx for the assert_select port. Alternatively, if someone can come up w/ a good name, we could just use that, but I don't have any good ideas. I definitely don't want response.should_select or anything like that - it makes no sense (to me - nor does assert_select to begin with!). All suggestions (besides that) are welcome. Thoughts? David From noreply at rubyforge.org Fri Dec 8 17:55:53 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 8 Dec 2006 17:55:53 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7179 ] script/generate rspec_resource generates incorrect helper name Message-ID: <20061208225553.683665241E90@rubyforge.org> Bugs item #7179, was opened at 2006-12-08 19:42 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7179&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Martin Emde (zraii) >Assigned to: David Chelimsky (dchelimsky) Summary: script/generate rspec_resource generates incorrect helper name Initial Comment: RSpec on Rails generates the wrong helper name, using the singular instead of the plural for the actual name of the module: PersonHelper instead of PeopleHelper RSpec/RSpec on rails version 0.7.4 ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 22:55 Message: Fixed in trunk (rev 1277). ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 20:25 Message: A lot of stuff gets generated, some by RSpec and some by Rails. Can you be more specific about what file you're seeing this in? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7179&group_id=797 From noreply at rubyforge.org Sat Dec 9 01:40:33 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 9 Dec 2006 01:40:33 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6519 ] Let RubyGems install dependencies instead of having to do it manually Message-ID: <20061209064033.5B1EF5241D9E@rubyforge.org> Feature Requests item #6519, was opened at 2006-11-06 17:50 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6519&group_id=797 Category: None Group: None >Status: Closed Priority: 3 Submitted By: Craig Demyanovich (cdemyanovich) Assigned to: Nobody (None) Summary: Let RubyGems install dependencies instead of having to do it manually Initial Comment: For release 0.7, ZenTest must be installed first. Instead of having to do this manually, it would be nicer if we could do this $ gem install -y rspec or $ gem update -y rspec and let RubyGems do the work. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-09 06:40 Message: N/A after 0.7.4. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-07 10:31 Message: It is possible to package generators in gems as long as the gem's name ends with _generator. Rails automatically discovers such gems. So if we want to go the gem way we have to name it rspec_generator or somesuch. Actually, spec/rails was called rspec_generator back in the days when it used to be a gem. I don't remember exactly why we chose to distribute it as a plugin and not package it as a gem. Does anyone else remember? I looked in the mail archives but couldn't find anything. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-07 10:14 Message: To be clear, I'm thinking that the 2nd gem comprises the 'spec/rails' library and expresses the dependencies on zentest and rspec: gem install -y rspec_rails => installs zentest.gem => installs rspec.gem => installs rspec_rails.gem At that point, the generators and spec_helper still need to be installed. That could be done via a command installed w/ rspec_rails or through script/plugin install. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-07 07:41 Message: spec/rails used to be a gem. we made it a plugin to make it easier to maintain install. maybe it's time to revisit the gem option - the structure has changed a bit and i think it's feasible. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-07 04:16 Message: The rails plugin is a plugin because of the generators. We could move the 'spec/rails' library to a gem. Then we'd have: rspec.gem rails_spec.gem The latter could handle dependencies on the rspec and zentest gems. Thoughts? ---------------------------------------------------------------------- Comment By: Craig Demyanovich (cdemyanovich) Date: 2006-11-07 01:35 Message: Thanks, Aslak, for clarifying the dependencies. I like your idea. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-07 01:26 Message: Every release of RSpec is comprised of two artefacts (so far); The RSpec gem and the RSpec plugin. The former represents the core functionality (and vision) of RSpec and BDD in general. The second artefact is "distributed" as a rails plugin (via code tagged in subversion). It is only the latter (the spec/rails Rails plugin) which depends upon ZenTest. RSpec core (the gem) does not. For the sake of convenience, we *could* make the gem depend on ZenTest to make the spec/rails experience smoother. However, I feel that an explicit dependency from the RSpec gem to ZenTest would imply an undesired intrusion of RSpec's desire to be simplistic and pristine (it does not depend on ZenTest). Would it not be better if we implemented a mechanism in spec/rails that informs developers how they need to install a compatible version of ZenTest? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6519&group_id=797 From noreply at rubyforge.org Sat Dec 9 01:43:57 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 9 Dec 2006 01:43:57 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6629 ] Can't run integration tests with spec-ified rails app. Message-ID: <20061209064358.259225241D9E@rubyforge.org> Bugs item #6629, was opened at 2006-11-11 22:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6629&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: David Chelimsky (dchelimsky) >Assigned to: David Chelimsky (dchelimsky) Summary: Can't run integration tests with spec-ified rails app. Initial Comment: After installing 'spec/rails' in an app that has rails integration tests (in test/integration), running rake test does not run the tests: $ rake test:integration (in /Users/david/projects/ruby/rspec/trunk/vendor/rspec_on_rails) /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" $ ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-09 06:43 Message: Turns out that just removing the init code from init.rb does the trick. We don't actually want the plugin to load unless we're actually running specs. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 23:53 Message: Thanks Pat. Very helpful. I'm going to leave this open as I think it's still a bug (a workaround should not be required). Cheers! ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 23:32 Message: I'm not entirely sure what the problem is, as far as I can tell it has something to do with the rspec stuff getting loaded. Rails unit and functional tests also aren't run - you might have used a generator that uses them. My workaround was pretty simple. I just added a flag to see if rspec shouldn't be loaded, which would be the case for unit/functional/integration. In spec_helper.rb, after the RAILS_ENV declaration, add ENV["NO_RSPEC"] = nil In test_helper.rb, after the RAILS_ENV declaration, add ENV["NO_RSPEC"] = "true" And in rspec/init.rb, change the code to if ENV['RAILS_ENV'] == 'test' && ENV['NO_RSPEC'].nil? then require 'rspec_on_rails' end Simple, works for me. Running "rake" will run unit tests, functional tests, integration tests, model specs, controller specs, and then view specs. Perfect for making sure that any generated code tests fine as well as your custom code. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6629&group_id=797 From noreply at rubyforge.org Sat Dec 9 02:08:18 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 9 Dec 2006 02:08:18 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6760 ] fatal error when accessing nested finders in rspec Message-ID: <20061209070818.340215241F08@rubyforge.org> Bugs item #6760, was opened at 2006-11-18 05:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6760&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Chad Humphries (spicycode) Assigned to: David Chelimsky (dchelimsky) Summary: fatal error when accessing nested finders in rspec Initial Comment: We have several models that have relationships defined like this (on edge rails): has_many :items do def incomplete find(:all, :conditions => 'completed_at is null') end def complete find(:all, :conditions => 'completed_at is not null') end end This let's you do things like object.items.incomplete and object.items.complete... however in rspec if you try to use a model that has this type of collection in 0.7.X and up you get a repeating error (2-3 pages of it) after a long delay (30-90 seconds) that says something along the lines of: [project_path]/config/../vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:98:in `method_missing' If you remove the nested finders (ie change it to just be has_many :items) it works fine again. I'll try to investigate and see if I can find the cause, submitting as bug as it's rather late here. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-09 07:08 Message: Actually, I can't find a failing spec when I comment that out. I did add specs for a scenario similar to that which you describe above and removing ActiveRecord::Associations::HasManyAssociation.handle_underscores _for_rspec! got them to pass, so away it goes! fixed in trunk (rev 1280) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-24 22:18 Message: This one is going to stay broken until 0.8 because commenting that out will bring back another bug. This is all related to conflicts between RSpec's and Rails' use of method_missing. 0.8 will remove RSpec's use of method missing on Object. ---------------------------------------------------------------------- Comment By: Chad Humphries (spicycode) Date: 2006-11-18 16:17 Message: It looks like the line: ActiveRecord::Associations::HasManyAssociation.handle_underscores_for_rspec! is causing it. If I comment it out in the plugin (0.7.2) things start working again in tests against models with this type of association. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6760&group_id=797 From bkeepers at gmail.com Sat Dec 9 14:21:46 2006 From: bkeepers at gmail.com (Brandon Keepers) Date: Sat, 9 Dec 2006 14:21:46 -0500 Subject: [rspec-devel] port of assert_select In-Reply-To: <57c63afe0612081419s2cd9f810tda7c0aa1103d73bb@mail.gmail.com> References: <57c63afe0612081419s2cd9f810tda7c0aa1103d73bb@mail.gmail.com> Message-ID: On Dec 8, 2006, at 5:19 PM, David Chelimsky wrote: > Hi everyone, > > I just checked in a preliminary port of assert_select for > rspec_on_rails. It only works w/ 1.1.6 so far and you have to have the > assert_select plugin installed for it to work. > > It uses the following syntax: > > response.should_have (accepts same args as assert_select) > response.should_have_encoded (accepts same args as > assert_select_encoded) > response.should_have_email (accepts same args as assert_select_email) > response.should_have_feed (accepts same args as assert_select_feed) > > I'd like to add the rjs support and I'd like to use should_have_rjs, > but we already have that and it uses different syntax. I'd like to > deprecate it in favor of this port, because assert_select is actually > something built into rails testing already (>= 1.2.0). > > I'm thinking we could rename should_have_tag and should_have_rjs to > should_render_xxx or should_include_xxx. That would make for a simple > search/replace for those who already have specs w/ those and allows us > to use should_have_xxx for the assert_select port. > > Alternatively, if someone can come up w/ a good name, we could just > use that, but I don't have any good ideas. I definitely don't want > response.should_select or anything like that - it makes no sense (to > me - nor does assert_select to begin with!). All suggestions (besides > that) are welcome. > > Thoughts? > > David Except, when I use it, I get the following error: wrong number of arguments (2 for 1) ./spec/views/account/login_view_spec.rb:15:in `should_have' Here's an excerpt of the spec/views/account/login_view_spec: context "The login page" do specify "should have a login field with a label" do render '/account/login' response.should_have "label[for=login]", 'Username' response.should_have_tag "input[name=login]" end end It would seem that it is trying to call the other should_have, since the one one response takes multiple args and just passes them on to assert_select. Any ideas? Thanks, Brandon From dchelimsky at gmail.com Sat Dec 9 16:33:27 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Sat, 9 Dec 2006 15:33:27 -0600 Subject: [rspec-devel] port of assert_select In-Reply-To: References: <57c63afe0612081419s2cd9f810tda7c0aa1103d73bb@mail.gmail.com> Message-ID: <57c63afe0612091333h4edcff30ifc0508b9e0791446@mail.gmail.com> should_have uses the assert_select syntax. should_have_tag uses the assert_tag syntax. Make sense? On 12/9/06, Brandon Keepers wrote: > On Dec 8, 2006, at 5:19 PM, David Chelimsky wrote: > > > Hi everyone, > > > > I just checked in a preliminary port of assert_select for > > rspec_on_rails. It only works w/ 1.1.6 so far and you have to have the > > assert_select plugin installed for it to work. > > > > It uses the following syntax: > > > > response.should_have (accepts same args as assert_select) > > response.should_have_encoded (accepts same args as > > assert_select_encoded) > > response.should_have_email (accepts same args as assert_select_email) > > response.should_have_feed (accepts same args as assert_select_feed) > > > > I'd like to add the rjs support and I'd like to use should_have_rjs, > > but we already have that and it uses different syntax. I'd like to > > deprecate it in favor of this port, because assert_select is actually > > something built into rails testing already (>= 1.2.0). > > > > I'm thinking we could rename should_have_tag and should_have_rjs to > > should_render_xxx or should_include_xxx. That would make for a simple > > search/replace for those who already have specs w/ those and allows us > > to use should_have_xxx for the assert_select port. > > > > Alternatively, if someone can come up w/ a good name, we could just > > use that, but I don't have any good ideas. I definitely don't want > > response.should_select or anything like that - it makes no sense (to > > me - nor does assert_select to begin with!). All suggestions (besides > > that) are welcome. > > > > Thoughts? > > > > David > > > Except, when I use it, I get the following error: > > wrong number of arguments (2 for 1) > ./spec/views/account/login_view_spec.rb:15:in `should_have' > > Here's an excerpt of the spec/views/account/login_view_spec: > > context "The login page" do > specify "should have a login field with a label" do > render '/account/login' > response.should_have "label[for=login]", 'Username' > response.should_have_tag "input[name=login]" > end > end > > It would seem that it is trying to call the other should_have, since > the one one response takes multiple args and just passes them on to > assert_select. > > Any ideas? > > Thanks, > Brandon > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bkeepers at gmail.com Sat Dec 9 17:05:59 2006 From: bkeepers at gmail.com (Brandon Keepers) Date: Sat, 9 Dec 2006 17:05:59 -0500 Subject: [rspec-devel] port of assert_select In-Reply-To: <57c63afe0612091333h4edcff30ifc0508b9e0791446@mail.gmail.com> References: <57c63afe0612081419s2cd9f810tda7c0aa1103d73bb@mail.gmail.com> <57c63afe0612091333h4edcff30ifc0508b9e0791446@mail.gmail.com> Message-ID: <59EAD0C6-A953-4B58-983C-FFA3E4EA1AD7@gmail.com> Yeah, and that is proper syntax for assert select. assert_select(selector, *values, equality?, message?) { |elems| ... } assert_select(element, selector, *values, equality?, message?) { | elems| ... } assert_select "html:root>head>title", "Login" assert_select "form[action=?]", url_for(:action=>"login") do assert_select "input[type=text][name=username]" assert_select "input[type=password][name=password]" end Brandon On Dec 9, 2006, at 4:33 PM, David Chelimsky wrote: > should_have uses the assert_select syntax. > > should_have_tag uses the assert_tag syntax. > > Make sense? > > On 12/9/06, Brandon Keepers wrote: >> On Dec 8, 2006, at 5:19 PM, David Chelimsky wrote: >> >>> Hi everyone, >>> >>> I just checked in a preliminary port of assert_select for >>> rspec_on_rails. It only works w/ 1.1.6 so far and you have to >>> have the >>> assert_select plugin installed for it to work. >>> >>> It uses the following syntax: >>> >>> response.should_have (accepts same args as assert_select) >>> response.should_have_encoded (accepts same args as >>> assert_select_encoded) >>> response.should_have_email (accepts same args as >>> assert_select_email) >>> response.should_have_feed (accepts same args as assert_select_feed) >>> >>> I'd like to add the rjs support and I'd like to use should_have_rjs, >>> but we already have that and it uses different syntax. I'd like to >>> deprecate it in favor of this port, because assert_select is >>> actually >>> something built into rails testing already (>= 1.2.0). >>> >>> I'm thinking we could rename should_have_tag and should_have_rjs to >>> should_render_xxx or should_include_xxx. That would make for a >>> simple >>> search/replace for those who already have specs w/ those and >>> allows us >>> to use should_have_xxx for the assert_select port. >>> >>> Alternatively, if someone can come up w/ a good name, we could just >>> use that, but I don't have any good ideas. I definitely don't want >>> response.should_select or anything like that - it makes no sense (to >>> me - nor does assert_select to begin with!). All suggestions >>> (besides >>> that) are welcome. >>> >>> Thoughts? >>> >>> David >> >> >> Except, when I use it, I get the following error: >> >> wrong number of arguments (2 for 1) >> ./spec/views/account/login_view_spec.rb:15:in `should_have' >> >> Here's an excerpt of the spec/views/account/login_view_spec: >> >> context "The login page" do >> specify "should have a login field with a label" do >> render '/account/login' >> response.should_have "label[for=login]", 'Username' >> response.should_have_tag "input[name=login]" >> end >> end >> >> It would seem that it is trying to call the other should_have, since >> the one one response takes multiple args and just passes them on to >> assert_select. >> >> Any ideas? >> >> Thanks, >> Brandon >> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From bkeepers at gmail.com Sat Dec 9 17:14:15 2006 From: bkeepers at gmail.com (Brandon Keepers) Date: Sat, 9 Dec 2006 17:14:15 -0500 Subject: [rspec-devel] port of assert_select In-Reply-To: <57c63afe0612091333h4edcff30ifc0508b9e0791446@mail.gmail.com> References: <57c63afe0612081419s2cd9f810tda7c0aa1103d73bb@mail.gmail.com> <57c63afe0612091333h4edcff30ifc0508b9e0791446@mail.gmail.com> Message-ID: <02304FFB-7F0C-4A93-99F3-CEC56FA60C5B@gmail.com> duh, I see. Didn't realize that I didn't change the second one from should_have_tag. The error was misleading because it was for "should_have". On Dec 9, 2006, at 4:33 PM, David Chelimsky wrote: > should_have uses the assert_select syntax. > > should_have_tag uses the assert_tag syntax. > > Make sense? > > On 12/9/06, Brandon Keepers wrote: >> On Dec 8, 2006, at 5:19 PM, David Chelimsky wrote: >> >>> Hi everyone, >>> >>> I just checked in a preliminary port of assert_select for >>> rspec_on_rails. It only works w/ 1.1.6 so far and you have to >>> have the >>> assert_select plugin installed for it to work. >>> >>> It uses the following syntax: >>> >>> response.should_have (accepts same args as assert_select) >>> response.should_have_encoded (accepts same args as >>> assert_select_encoded) >>> response.should_have_email (accepts same args as >>> assert_select_email) >>> response.should_have_feed (accepts same args as assert_select_feed) >>> >>> I'd like to add the rjs support and I'd like to use should_have_rjs, >>> but we already have that and it uses different syntax. I'd like to >>> deprecate it in favor of this port, because assert_select is >>> actually >>> something built into rails testing already (>= 1.2.0). >>> >>> I'm thinking we could rename should_have_tag and should_have_rjs to >>> should_render_xxx or should_include_xxx. That would make for a >>> simple >>> search/replace for those who already have specs w/ those and >>> allows us >>> to use should_have_xxx for the assert_select port. >>> >>> Alternatively, if someone can come up w/ a good name, we could just >>> use that, but I don't have any good ideas. I definitely don't want >>> response.should_select or anything like that - it makes no sense (to >>> me - nor does assert_select to begin with!). All suggestions >>> (besides >>> that) are welcome. >>> >>> Thoughts? >>> >>> David >> >> >> Except, when I use it, I get the following error: >> >> wrong number of arguments (2 for 1) >> ./spec/views/account/login_view_spec.rb:15:in `should_have' >> >> Here's an excerpt of the spec/views/account/login_view_spec: >> >> context "The login page" do >> specify "should have a login field with a label" do >> render '/account/login' >> response.should_have "label[for=login]", 'Username' >> response.should_have_tag "input[name=login]" >> end >> end >> >> It would seem that it is trying to call the other should_have, since >> the one one response takes multiple args and just passes them on to >> assert_select. >> >> Any ideas? >> >> Thanks, >> Brandon >> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From noreply at rubyforge.org Sun Dec 10 18:06:40 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 10 Dec 2006 18:06:40 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061210230640.3ECF55241415@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 18:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From noreply at rubyforge.org Sun Dec 10 19:45:55 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 10 Dec 2006 19:45:55 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061211004555.545025241456@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 18:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-10 19:45 Message: Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From antti.tarvainen at iki.fi Mon Dec 11 11:32:26 2006 From: antti.tarvainen at iki.fi (Antti Tarvainen) Date: Mon, 11 Dec 2006 18:32:26 +0200 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> Message-ID: <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> Replying to an old mail: On 10/11/06, George Anderson wrote: > This may be overkill, but bear with me. > > should_equal tests for object identity. Typically when a should_equal > expectation fails, the failure message is straightforward. For example, "1 > should equal 2" is evident. However, in the case of strings and arrays, > it's not always so clear. Witness: > > "string".should_equal "string" > => FAILED: "string" should equal "string" > > [].should_equal [] > => FAILED: [] should equal [] > > It may be pandering to the noobs in the crowd (I consider myself well within > their ranks), but it seems the failure message would be more clear if it > included some distinguishing information, such as object_ids. Something > like: > > "string".should_equal "string" > => FAILED: "string" should equal "string" 1587714> > > [].should_equal [] > => FAILED: [] should equal [] > > Granted, it's not elegant/pretty/terse, but the issue at hand is more > obvious. Adding object_ids may do little more than help the less > experienced among us (ahem) learn more quickly the distinction between > should_equal, should_eql, and should ==, hence my initial "overkill" > comment. Having gone through the exercise of hacking (truly) together > support for this, I've now clearly gotten this distinction. > > Thoughts? I think this is a great idea. Should_equal seems to be a frequent source of confusion for newcomers. One way to make the output terser would be to include object_id's in the message only if the message strings are otherwise not equal - ugh, I mean not == :-). Anyone else feel the same way? 1) 'This spec should fail' FAILED "test" should equal "test". 2) 'This spec should fail too' FAILED "foo" should equal "bar". # Spec: require File.dirname(__FILE__) + '/spec_helper' module Spec module Expectations module Should # :nodoc: class Should < Base def equal(expected) unless @target.equal?(expected) if @target.inspect == expected.inspect fail_with_message("#{@target.inspect} should equal #{expected.inspect}.") else fail_with_message("#{@target.inspect} should equal #{expected.inspect}.") end end end end end end end context "This spec" do specify "should fail" do "test".should_equal "test" end specify "should fail too" do "foo".should_equal "bar" end end # Antti T. From mae at mindflowsolutions.com Mon Dec 11 12:27:37 2006 From: mae at mindflowsolutions.com (Matthew Elder) Date: Mon, 11 Dec 2006 09:27:37 -0800 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> Message-ID: <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> I think this might cause problems because from time to time people will override the meaning of equal or eql. I think it is better to have a FAQ or something that will inform people of the ruby grammar in this context. More terse, more to the point. If your using equals then you should _know_ what that means. --Matt On 12/11/06, Antti Tarvainen wrote: > Replying to an old mail: > > On 10/11/06, George Anderson wrote: > > This may be overkill, but bear with me. > > > > should_equal tests for object identity. Typically when a should_equal > > expectation fails, the failure message is straightforward. For example, "1 > > should equal 2" is evident. However, in the case of strings and arrays, > > it's not always so clear. Witness: > > > > "string".should_equal "string" > > => FAILED: "string" should equal "string" > > > > [].should_equal [] > > => FAILED: [] should equal [] > > > > It may be pandering to the noobs in the crowd (I consider myself well within > > their ranks), but it seems the failure message would be more clear if it > > included some distinguishing information, such as object_ids. Something > > like: > > > > "string".should_equal "string" > > => FAILED: "string" should equal "string" > 1587714> > > > > [].should_equal [] > > => FAILED: [] should equal [] > > > > Granted, it's not elegant/pretty/terse, but the issue at hand is more > > obvious. Adding object_ids may do little more than help the less > > experienced among us (ahem) learn more quickly the distinction between > > should_equal, should_eql, and should ==, hence my initial "overkill" > > comment. Having gone through the exercise of hacking (truly) together > > support for this, I've now clearly gotten this distinction. > > > > Thoughts? > > I think this is a great idea. Should_equal seems to be a frequent > source of confusion for newcomers. One way to make the output terser > would be to include object_id's in the message only if the message > strings are otherwise not equal - ugh, I mean not == :-). > > Anyone else feel the same way? > > > 1) > 'This spec should fail' FAILED > "test" should equal "test". > > 2) > 'This spec should fail too' FAILED > "foo" should equal "bar". > > > # Spec: > > require File.dirname(__FILE__) + '/spec_helper' > > module Spec > module Expectations > module Should # :nodoc: > class Should < Base > def equal(expected) > unless @target.equal?(expected) > if @target.inspect == expected.inspect > fail_with_message("#{@target.inspect} #{@target.object_id}> should equal #{expected.inspect} #{expected.object_id}>.") > else > fail_with_message("#{@target.inspect} should equal > #{expected.inspect}.") > end > end > end > end > end > end > end > > context "This spec" do > specify "should fail" do > "test".should_equal "test" > end > > specify "should fail too" do > "foo".should_equal "bar" > end > end > > > > # Antti T. > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Matthew Elder Mindflow Solutions http://www.mindflowsolutions.com From dchelimsky at gmail.com Mon Dec 11 12:45:34 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Mon, 11 Dec 2006 15:45:34 -0200 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> Message-ID: <57c63afe0612110945n283fc388nb24fe928613aa2dc@mail.gmail.com> On 12/11/06, Matthew Elder wrote: > I think this might cause problems because from time to time people > will override the meaning of equal or eql. I think it is better to > have a FAQ or something that will inform people of the ruby grammar in > this context. Explanation does exist here: http://rspec.rubyforge.org/documentation/expectations.html It will also be in the rdocs in the next release. > More terse, more to the point. If your using equals then > you should _know_ what that means. > > --Matt > > On 12/11/06, Antti Tarvainen wrote: > > Replying to an old mail: > > > > On 10/11/06, George Anderson wrote: > > > This may be overkill, but bear with me. > > > > > > should_equal tests for object identity. Typically when a should_equal > > > expectation fails, the failure message is straightforward. For example, "1 > > > should equal 2" is evident. However, in the case of strings and arrays, > > > it's not always so clear. Witness: > > > > > > "string".should_equal "string" > > > => FAILED: "string" should equal "string" > > > > > > [].should_equal [] > > > => FAILED: [] should equal [] > > > > > > It may be pandering to the noobs in the crowd (I consider myself well within > > > their ranks), but it seems the failure message would be more clear if it > > > included some distinguishing information, such as object_ids. Something > > > like: > > > > > > "string".should_equal "string" > > > => FAILED: "string" should equal "string" > > 1587714> > > > > > > [].should_equal [] > > > => FAILED: [] should equal [] > > > > > > Granted, it's not elegant/pretty/terse, but the issue at hand is more > > > obvious. Adding object_ids may do little more than help the less > > > experienced among us (ahem) learn more quickly the distinction between > > > should_equal, should_eql, and should ==, hence my initial "overkill" > > > comment. Having gone through the exercise of hacking (truly) together > > > support for this, I've now clearly gotten this distinction. > > > > > > Thoughts? > > > > I think this is a great idea. Should_equal seems to be a frequent > > source of confusion for newcomers. One way to make the output terser > > would be to include object_id's in the message only if the message > > strings are otherwise not equal - ugh, I mean not == :-). > > > > Anyone else feel the same way? > > > > > > 1) > > 'This spec should fail' FAILED > > "test" should equal "test". > > > > 2) > > 'This spec should fail too' FAILED > > "foo" should equal "bar". > > > > > > # Spec: > > > > require File.dirname(__FILE__) + '/spec_helper' > > > > module Spec > > module Expectations > > module Should # :nodoc: > > class Should < Base > > def equal(expected) > > unless @target.equal?(expected) > > if @target.inspect == expected.inspect > > fail_with_message("#{@target.inspect} > #{@target.object_id}> should equal #{expected.inspect} > #{expected.object_id}>.") > > else > > fail_with_message("#{@target.inspect} should equal > > #{expected.inspect}.") > > end > > end > > end > > end > > end > > end > > end > > > > context "This spec" do > > specify "should fail" do > > "test".should_equal "test" > > end > > > > specify "should fail too" do > > "foo".should_equal "bar" > > end > > end > > > > > > > > # Antti T. > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > -- > > Matthew Elder > Mindflow Solutions > http://www.mindflowsolutions.com > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bob.cotton at rallydev.com Mon Dec 11 14:27:17 2006 From: bob.cotton at rallydev.com (Bob Cotton) Date: Mon, 11 Dec 2006 12:27:17 -0700 Subject: [rspec-devel] Specs for context_setup In-Reply-To: <8d961d900612071522s7f7f0844w9052d84f6eb29b59@mail.gmail.com> (aslak hellesoy's message of "Fri, 8 Dec 2006 00:22:18 +0100") References: <8d961d900612071522s7f7f0844w9052d84f6eb29b59@mail.gmail.com> Message-ID: Here is my first pass at specs for context_setup/teardown. I'll move these into the appropriate specs, but for now: context_setup and context_teardown - should run context_setup only once per context - should run context_teardown only once per context - should run context_teardown when no context_setup given - should run superclass context_setup method and context_setup block - should run superclass context_teardown and context_teardown block - should copy instance variables from context_setup's execution context into spec's execution context - should not copy @spec instance variable from context_setup's execution context into spec's execution context - should call context_setup before any setup - should call context_teardown after any teardown - should not call context_setup on dry run - should not call context_teardown on dry run - should run context_teardown even when main block fails - should run context_teardown when any spec fails - should provide context_setup as spec name if failure in context_setup - should provide context_teardown as spec name if failure in context_teardown - should not run context if context_setup fails - should verify mocks after context_teardown what else? -Bob -- Bob Cotton Test Architect -- Rally Software -- rallydev.com http://www.testarchitecture.com/blog From aslak.hellesoy at gmail.com Mon Dec 11 15:13:36 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Mon, 11 Dec 2006 21:13:36 +0100 Subject: [rspec-devel] Specs for context_setup In-Reply-To: References: <8d961d900612071522s7f7f0844w9052d84f6eb29b59@mail.gmail.com> Message-ID: <8d961d900612111213p36c1e4d8j1880a2632d4c25ef@mail.gmail.com> On 12/11/06, Bob Cotton wrote: > > Here is my first pass at specs for context_setup/teardown. I'll move > these into the appropriate specs, but for now: > > context_setup and context_teardown > - should run context_setup only once per context > - should run context_teardown only once per context > - should run context_teardown when no context_setup given > - should run superclass context_setup method and context_setup block > - should run superclass context_teardown and context_teardown block > - should copy instance variables from context_setup's execution context into spec's execution context > - should not copy @spec instance variable from context_setup's execution context into spec's execution context > - should call context_setup before any setup > - should call context_teardown after any teardown > - should not call context_setup on dry run > - should not call context_teardown on dry run > - should run context_teardown even when main block fails > - should run context_teardown when any spec fails > - should provide context_setup as spec name if failure in context_setup > - should provide context_teardown as spec name if failure in context_teardown > - should not run context if context_setup fails > - should verify mocks after context_teardown > That sounds like the best specced contribution in RSpec's history > what else? > Le code! ;-) Aslak > -Bob > > -- > Bob Cotton > Test Architect -- Rally Software -- rallydev.com > http://www.testarchitecture.com/blog > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Tue Dec 12 05:54:26 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 12 Dec 2006 05:54:26 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6112 ] Rspec on Rails: Postgresql reports WARNING: there is already a transaction in progress Message-ID: <20061212105426.422DE5240EE5@rubyforge.org> Bugs item #6112, was opened at 2006-10-13 00:35 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6112&group_id=797 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: David Lee (davidlee) Assigned to: Nobody (None) Summary: Rspec on Rails: Postgresql reports WARNING: there is already a transaction in progress Initial Comment: This has been verified on Arch Linux (gimmick) and OS X Tiger (postgres 8.1 via darwinports), using Rails 1.1.2 and RSpec 0.6.4 & the rspec rails plugin. Description (output from skeletal rails project): /tmp/foo % spec spec/models/tester_spec.rb WARNING: there is already a transaction in progress WARNING: there is no transaction in progress .WARNING: there is already a transaction in progress WARNING: there is no transaction in progress F 1) Spec::Expectations::ExpectationNotMetError in 'Tester class with fixtures loaded should have more specifications' not enough specs ./spec/models/tester_spec.rb:11:in `should have more specifications' Finished in 0.326214 seconds 2 specifications, 1 failure ____ 2 lines of warnings are generated per specify block. When running a substantial spec, voluminous WARNINGs are generated, such that it is necessary to run spec spec/models/* 2> /dev/null to prevent the test output being lost in noise. ---------------------------------------------------------------------- >Comment By: David Lee (davidlee) Date: 2006-12-12 21:54 Message: This no longer seems to be an issue with the current release, on account of it being substantially rewritten and choc full of awesome. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 13:27 Message: David - is this still a problem with 0.7.4? Things have changed quite a bit since 0.6. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6112&group_id=797 From noreply at rubyforge.org Tue Dec 12 08:49:56 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 12 Dec 2006 08:49:56 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7234 ] The Rcov rake task fails when running the specs Message-ID: <20061212134957.13E9A5241545@rubyforge.org> Bugs item #7234, was opened at 2006-12-12 13:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Clint Bishop (norobotdiving) Assigned to: Nobody (None) Summary: The Rcov rake task fails when running the specs Initial Comment: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh > build/spec_results.html"] end I get this error: $ rake spec_rcov --trace (in /Users/tworker1/projects/disco_stu/trunk/disco_stu) ** Invoke ci (first_time) ** Invoke testing (first_time) ** Execute testing ** Invoke migrate (first_time) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute migrate ** Invoke spec_rcov (first_time) ** Invoke clobber_spec_rcov (first_time) ** Execute clobber_spec_rcov rm -r coverage ** Execute spec_rcov /usr/local/bin/ruby -I"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" -S rcov --exclude lib\/spec,bin\/spec -o "coverage" "/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" -- "spec/controllers/citycliq_controller_spec.rb" "spec/helpers/citycliq_helper_spec.rb" "spec/models/event_spec.rb" "spec/models/hotspot_spec.rb" "spec/views/citycliq/create_event_spec.rb" "spec/views/citycliq/create_hotspot_spec.rb" "spec/views/citycliq/index_spec.rb" "spec/views/citycliq/login_spec.rb" "spec/views/citycliq/view_event_detail_spec.rb" "spec/views/citycliq/view_events_spec.rb" "spec/views/citycliq/view_hotspot_detail_spec.rb" "spec/views/citycliq/view_hotspots_spec.rb" -fh > build/spec_results.html /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] rake aborted! Command failed with status (134): [/usr/local/bin/ruby -I"/usr/local/lib/ruby...] /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:131:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:831:in `verbose' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:110:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/local/bin/rake:18 Same error I get if I just run the specs through rcov: $ rcov spec/**/*spec.rb ........../usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] Abort trap But I don't get the error if I turn off rcov's optimized C runtime $ rcov spec/**/*spec.rb --no-rcovrt .................................... Finished in 12.125441 seconds 36 specifications, 0 failures I've noticed that if there aren't too many specs then it runs just fine. Once we pass a certain number we get the error listed above. We're using: OS X 10.4.8 1.5 GHz Intel Core Solo 1Gb ram rcov 0.7.0 rcov rails plugin installed as an external svn repos (so it's on edge) rspec 0.7.4 rspec rails plugin for 0.7.4 rails 1.1.6 Ruby 1.8.4 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 From antti.tarvainen at iki.fi Tue Dec 12 10:24:09 2006 From: antti.tarvainen at iki.fi (Antti Tarvainen) Date: Tue, 12 Dec 2006 17:24:09 +0200 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> Message-ID: <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> On 12/11/06, Matthew Elder wrote: > I think this might cause problems because from time to time people > will override the meaning of equal or eql. That would definitely be a good reason not to do it. Can you specify what kind of problems it might cause? The code I proposed would call the overriden equal? method just like should_equal does nowadays. Here's the code: > > class Should < Base > > def equal(expected) > > unless @target.equal?(expected) > > if @target.inspect == expected.inspect > > # Show message with object ids > > else > > # Show ordinary message > > end > > end > > end > > end > If your using equals then you should _know_ what that means. Yes, but how many Test::Unit emigrants really do know what should_equal means? Most people don't read every word of the documentation. I am just afraid that problems with should_equal will annoy a lot of newcomers. Antti T. From wilsonb at gmail.com Tue Dec 12 11:49:46 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Tue, 12 Dec 2006 11:49:46 -0500 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> Message-ID: On 12/12/06, Antti Tarvainen wrote: > On 12/11/06, Matthew Elder wrote: > > I think this might cause problems because from time to time people > > will override the meaning of equal or eql. > > That would definitely be a good reason not to do it. Can you specify > what kind of problems it might cause? The code I proposed would call > the overriden equal? method just like should_equal does nowadays. > > Here's the code: > > > class Should < Base > > > def equal(expected) > > > unless @target.equal?(expected) > > > if @target.inspect == expected.inspect > > > # Show message with object ids > > > else > > > # Show ordinary message > > > end > > > end > > > end > > > end > > > If your using equals then you should _know_ what that means. > > Yes, but how many Test::Unit emigrants really do know what > should_equal means? Most people don't read every word of the > documentation. > > I am just afraid that problems with should_equal will annoy a lot of newcomers. > It does, yes. I've also had problems with the fact that the RSpec on Rails plugin doesn't use HashWithIndifferentAccess. When you mock out the controller params, for example, you have to use strings, or else your expectations will fail. While I agree with this philosophically, Rails people really seem to complain about it. I guess I'm voting for some slightly looser semantics, along with some docs about how they've been loosened. From mae at mindflowsolutions.com Tue Dec 12 12:01:20 2006 From: mae at mindflowsolutions.com (Matthew Elder) Date: Tue, 12 Dec 2006 09:01:20 -0800 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> Message-ID: <987d172d0612120901j143fad40yfe8553eecd6a4d0e@mail.gmail.com> Annoyance IMO is not a good enough reason. The problem with showing the object ids is that this implies that this is relevant for equals -- I'm not sure how rspec works but I think when it shows equality it is just using the Object#inspect method like so: irb(main):002:0> puts "foo".inspect "foo" => nil In newer versions of ruby they might change the inspection behavior of string. The point is, if you are going to point fingers at this ambiguity then you should point it at ruby -- it is not an rspec problem. If it bothers you that much you could override the String#inspect method and that would solve your problem. What do you think? On 12/12/06, Antti Tarvainen wrote: > On 12/11/06, Matthew Elder wrote: > > I think this might cause problems because from time to time people > > will override the meaning of equal or eql. > > That would definitely be a good reason not to do it. Can you specify > what kind of problems it might cause? The code I proposed would call > the overriden equal? method just like should_equal does nowadays. > > Here's the code: > > > class Should < Base > > > def equal(expected) > > > unless @target.equal?(expected) > > > if @target.inspect == expected.inspect > > > # Show message with object ids > > > else > > > # Show ordinary message > > > end > > > end > > > end > > > end > > > If your using equals then you should _know_ what that means. > > Yes, but how many Test::Unit emigrants really do know what > should_equal means? Most people don't read every word of the > documentation. > > I am just afraid that problems with should_equal will annoy a lot of newcomers. > > > Antti T. > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Matthew Elder Mindflow Solutions http://www.mindflowsolutions.com From wilsonb at gmail.com Tue Dec 12 12:06:54 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Tue, 12 Dec 2006 12:06:54 -0500 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <987d172d0612120901j143fad40yfe8553eecd6a4d0e@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> <987d172d0612120901j143fad40yfe8553eecd6a4d0e@mail.gmail.com> Message-ID: On 12/12/06, Matthew Elder wrote: > Annoyance IMO is not a good enough reason. The problem with showing > the object ids is that this implies that this is relevant for equals > -- I'm not sure how rspec works but I think when it shows equality it > is just using the Object#inspect method like so: > > irb(main):002:0> puts "foo".inspect > "foo" > => nil > > In newer versions of ruby they might change the inspection behavior > of string. The point is, if you are going to point fingers at this > ambiguity then you should point it at ruby -- it is not an rspec > problem. If it bothers you that much you could override the > String#inspect method and that would solve your problem. > Lots of code out there relies on 'inspect' returning a version of String that can be parsed by Ruby back into itself. I know because I was working on this feature of Rubinius, and foolishly had 'inspect' doing something more verbose. Oops. :) I highly recommend not changing 'inspect', at least not while your code-under-test is running. Also.. if avoiding annoyance isn't a good enough reason to do something, what is? From mae at mindflowsolutions.com Tue Dec 12 12:39:02 2006 From: mae at mindflowsolutions.com (Matthew Elder) Date: Tue, 12 Dec 2006 09:39:02 -0800 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> <987d172d0612120901j143fad40yfe8553eecd6a4d0e@mail.gmail.com> Message-ID: <987d172d0612120939h4634a407v8907773f8786f25a@mail.gmail.com> On 12/12/06, Wilson Bilkovich wrote: > On 12/12/06, Matthew Elder wrote: > > Annoyance IMO is not a good enough reason. The problem with showing > > the object ids is that this implies that this is relevant for equals > > -- I'm not sure how rspec works but I think when it shows equality it > > is just using the Object#inspect method like so: > > > > irb(main):002:0> puts "foo".inspect > > "foo" > > => nil > > > > In newer versions of ruby they might change the inspection behavior > > of string. The point is, if you are going to point fingers at this > > ambiguity then you should point it at ruby -- it is not an rspec > > problem. If it bothers you that much you could override the > > String#inspect method and that would solve your problem. > > > > Lots of code out there relies on 'inspect' returning a version of > String that can be parsed by Ruby back into itself. I know because I > was working on this feature of Rubinius, and foolishly had 'inspect' > doing something more verbose. Oops. :) > > I highly recommend not changing 'inspect', at least not while your > code-under-test is running. > > Also.. if avoiding annoyance isn't a good enough reason to do > something, what is? While I agree this is a noble pursuit, I don't personally find it annoying :) If this were something I was worried about in my specs I would change String#inspect .. the case were talking about it just a string. Think of all the other classes, most Object#inspect methods show an oid. > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Matthew Elder Mindflow Solutions http://www.mindflowsolutions.com From aslak.hellesoy at gmail.com Tue Dec 12 12:48:18 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 12 Dec 2006 18:48:18 +0100 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <987d172d0612120939h4634a407v8907773f8786f25a@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> <987d172d0612120901j143fad40yfe8553eecd6a4d0e@mail.gmail.com> <987d172d0612120939h4634a407v8907773f8786f25a@mail.gmail.com> Message-ID: <8d961d900612120948t298ef9dbm7b0c575dd1307b30@mail.gmail.com> I don't think there is much chance that we'll change the equality semantics again. We've made RSpec behave like Ruby (as opposed to Test::Unit) and that's the way it should be. If people get surprised, they'll hopefully RTFM and then they'll be on track. Aslak From mae at mindflowsolutions.com Tue Dec 12 13:33:27 2006 From: mae at mindflowsolutions.com (Matthew Elder) Date: Tue, 12 Dec 2006 10:33:27 -0800 Subject: [rspec-devel] Failure message for "string".should_equal "string" In-Reply-To: <8d961d900612120948t298ef9dbm7b0c575dd1307b30@mail.gmail.com> References: <782d66f30611091905r1a70cd86icdfc6157e581b653@mail.gmail.com> <5b89e3bd0612110832j236875a2s1b5c43c3fb7810a1@mail.gmail.com> <987d172d0612110927o29a41be0g1a348fcc40871f1d@mail.gmail.com> <5b89e3bd0612120724w484b4224kdcf7176370d9d66@mail.gmail.com> <987d172d0612120901j143fad40yfe8553eecd6a4d0e@mail.gmail.com> <987d172d0612120939h4634a407v8907773f8786f25a@mail.gmail.com> <8d961d900612120948t298ef9dbm7b0c575dd1307b30@mail.gmail.com> Message-ID: <987d172d0612121033l45f5b95bjbe8464f529e0745d@mail.gmail.com> preach it, brother. On 12/12/06, aslak hellesoy wrote: > I don't think there is much chance that we'll change the equality > semantics again. We've made RSpec behave like Ruby (as opposed to > Test::Unit) and that's the way it should be. > > If people get surprised, they'll hopefully RTFM and then they'll be on track. > > Aslak > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Matthew Elder Mindflow Solutions http://www.mindflowsolutions.com From noreply at rubyforge.org Tue Dec 12 14:46:32 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 12 Dec 2006 14:46:32 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7234 ] The Rcov rake task fails when running the specs Message-ID: <20061212194632.4EC205241852@rubyforge.org> Bugs item #7234, was opened at 2006-12-12 08:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 Category: rails plugin Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Clint Bishop (norobotdiving) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: The Rcov rake task fails when running the specs Initial Comment: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh > build/spec_results.html"] end I get this error: $ rake spec_rcov --trace (in /Users/tworker1/projects/disco_stu/trunk/disco_stu) ** Invoke ci (first_time) ** Invoke testing (first_time) ** Execute testing ** Invoke migrate (first_time) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute migrate ** Invoke spec_rcov (first_time) ** Invoke clobber_spec_rcov (first_time) ** Execute clobber_spec_rcov rm -r coverage ** Execute spec_rcov /usr/local/bin/ruby -I"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" -S rcov --exclude lib\/spec,bin\/spec -o "coverage" "/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" -- "spec/controllers/citycliq_controller_spec.rb" "spec/helpers/citycliq_helper_spec.rb" "spec/models/event_spec.rb" "spec/models/hotspot_spec.rb" "spec/views/citycliq/create_event_spec.rb" "spec/views/citycliq/create_hotspot_spec.rb" "spec/views/citycliq/index_spec.rb" "spec/views/citycliq/login_spec.rb" "spec/views/citycliq/view_event_detail_spec.rb" "spec/views/citycliq/view_events_spec.rb" "spec/views/citycliq/view_hotspot_detail_spec.rb" "spec/views/citycliq/view_hotspots_spec.rb" -fh > build/spec_results.html /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] rake aborted! Command failed with status (134): [/usr/local/bin/ruby -I"/usr/local/lib/ruby...] /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:131:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:831:in `verbose' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:110:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/local/bin/rake:18 Same error I get if I just run the specs through rcov: $ rcov spec/**/*spec.rb ........../usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] Abort trap But I don't get the error if I turn off rcov's optimized C runtime $ rcov spec/**/*spec.rb --no-rcovrt .................................... Finished in 12.125441 seconds 36 specifications, 0 failures I've noticed that if there aren't too many specs then it runs just fine. Once we pass a certain number we get the error listed above. We're using: OS X 10.4.8 1.5 GHz Intel Core Solo 1Gb ram rcov 0.7.0 rcov rails plugin installed as an external svn repos (so it's on edge) rspec 0.7.4 rspec rails plugin for 0.7.4 rails 1.1.6 Ruby 1.8.4 ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-12 14:46 Message: Try this instead: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh"] t.out = "build/spec_results.html" end Also see http://rspec.rubyforge.org/rdoc/classes/Spec/Rake/SpecTask.html Does that work for you? If you still get a BUS error I'd take it up with Mauricio Fernandez (the rcov author) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 From noreply at rubyforge.org Wed Dec 13 05:04:10 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 05:04:10 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7249 ] stubs should support yielding Message-ID: <20061213100410.3069B52409DF@rubyforge.org> Feature Requests item #7249, was opened at 2006-12-13 10:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7249&group_id=797 Category: mock module Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: stubs should support yielding Initial Comment: Mocks support yielding, but stubs don't. They should. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7249&group_id=797 From noreply at rubyforge.org Wed Dec 13 05:06:47 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 05:06:47 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7249 ] stubs should support yielding Message-ID: <20061213100647.17E8F52409CF@rubyforge.org> Feature Requests item #7249, was opened at 2006-12-13 10:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7249&group_id=797 Category: mock module Group: None >Status: Closed Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: stubs should support yielding Initial Comment: Mocks support yielding, but stubs don't. They should. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-13 10:06 Message: fixed in trunk (rev 1284) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7249&group_id=797 From noreply at rubyforge.org Wed Dec 13 05:08:20 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 05:08:20 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7250 ] stubs should support throwing Message-ID: <20061213100820.4E1F852409E1@rubyforge.org> Feature Requests item #7250, was opened at 2006-12-13 10:08 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7250&group_id=797 Category: mock module Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: stubs should support throwing Initial Comment: Mocks support throwing. Stubs don't. They should. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7250&group_id=797 From noreply at rubyforge.org Wed Dec 13 05:11:31 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 05:11:31 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7250 ] stubs should support throwing Message-ID: <20061213101131.BA8E252409E1@rubyforge.org> Feature Requests item #7250, was opened at 2006-12-13 10:08 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7250&group_id=797 Category: mock module Group: None >Status: Closed Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: stubs should support throwing Initial Comment: Mocks support throwing. Stubs don't. They should. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-13 10:11 Message: Fixed in trunk (rev 1285) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7250&group_id=797 From noreply at rubyforge.org Wed Dec 13 05:43:11 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 05:43:11 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6807 ] port assert_select Message-ID: <20061213104311.CD3415240A83@rubyforge.org> Feature Requests item #6807, was opened at 2006-11-21 19:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6807&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: David Chelimsky (dchelimsky) Summary: port assert_select Initial Comment: Add an rspec implementation of assert_select. Need to decide whether to just duplicate existing API (using repsonse.should_have?????) or actually devise a more integrated API like this: repsonse.should_include(:form).with(:action => "blah") or response.should_include(:form).with do |form| form.should_include(:input).with(:name => 'age', :type => 'text') end or some such. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-13 10:43 Message: This is working w/ 1.2.0 and edge(5717) as of rspec rev 1286. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-08 22:00 Message: I checked in a preliminary port (rev 1276). It only works w/ 1.1.6 right now, but it works just like assert_select for everything except rjs: response.should_have (for tags w/ x-path like syntax) response.should_have_encoded response.should_have_email response.should_have_feed Remaining TODO: Get it to work w/ 1.2.0 and edge Figure out what to do about rjs (need a name other than should_have_rjs) Clean up the docs ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-22 13:00 Message: Josh - a plugin would be great. Could you use should_have instead of should_select (which doesn't really mean anything in this context): response.should_have "form>input[name=age][type=text]" I'm assuming you've got this implemented on ResponseBody, so there should be no conflict w/ Should#have. ---------------------------------------------------------------------- Comment By: Josh Chisholm (joshchisholm) Date: 2006-11-22 09:48 Message: I implemented a basic response.should_select by mixing in scrAPI. Haven't brought it up to date with rspec 0.72 yet, but I will if someone advises the best way to do so (assuming we don't want a scrAPI dependency in rspec core? - a plugin??). > The third seems to promote really detailed expectations about the HTML, and I think that way lies madness. If I understand correcly the second example implies the form has a child (somewhere unspecified) with certain specified attributes. I don't find this too detailed and if I remember correctly this can be done with a single selector: response.should_select "form>input[name=age][type=text]" This syntax is all I have needed so far. ---------------------------------------------------------------------- Comment By: Wilson Bilkovich (wilson) Date: 2006-11-21 22:43 Message: I like the: repsonse.should_include(:form).with(:action => "blah") version, myself. The third seems to promote really detailed expectations about the HTML, and I think that way lies madness. If someone writes the specs for it, I will code it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6807&group_id=797 From noreply at rubyforge.org Wed Dec 13 08:08:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 08:08:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061213130858.1A1155241142@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 16:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None Status: Closed Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: David Chelimsky (dchelimsky) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: Pat Maddox (pergesu) Date: 2006-12-13 06:08 Message: Is there any particular reason why the plugin uses externals to pull in Rails 1.1.6, 1.2.0, and edge? Seems pretty heavyweight to me...I don't think it should be pulling in Rails at all. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 08:39 Message: Done in trunk (rev 1260) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 00:10 Message: It will probably happen by mid-week. David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-03 00:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 16:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 18:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 18:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 17:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 17:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Wed Dec 13 08:21:38 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 08:21:38 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061213132139.0F7FF524114C@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 16:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None Status: Closed Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: David Chelimsky (dchelimsky) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: Pat Maddox (pergesu) Date: 2006-12-13 06:21 Message: Also, if I try to run my specs with rake, I get /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- spec/rails (MissingSourceFile) Both trunk edge and the plugin are installed. Edge Rails too ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-13 06:08 Message: Is there any particular reason why the plugin uses externals to pull in Rails 1.1.6, 1.2.0, and edge? Seems pretty heavyweight to me...I don't think it should be pulling in Rails at all. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 08:39 Message: Done in trunk (rev 1260) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 00:10 Message: It will probably happen by mid-week. David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-03 00:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 16:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 18:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 18:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 17:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 17:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Wed Dec 13 08:48:50 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 08:48:50 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061213134850.9052B52411B7@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 23:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None Status: Closed Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: David Chelimsky (dchelimsky) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-13 13:48 Message: Pat - you are getting the entire project for the plugin. What you want is just the plugin: svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugin/rspec_on_rails ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-13 13:21 Message: Also, if I try to run my specs with rake, I get /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- spec/rails (MissingSourceFile) Both trunk edge and the plugin are installed. Edge Rails too ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-13 13:08 Message: Is there any particular reason why the plugin uses externals to pull in Rails 1.1.6, 1.2.0, and edge? Seems pretty heavyweight to me...I don't think it should be pulling in Rails at all. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 15:39 Message: Done in trunk (rev 1260) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 07:10 Message: It will probably happen by mid-week. David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-03 07:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 23:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 01:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 01:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 01:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 01:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 00:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-27 00:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-27 00:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 00:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Wed Dec 13 09:04:18 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 13 Dec 2006 09:04:18 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6898 ] Can we separate rspec from the plugins? Message-ID: <20061213140418.EEE7B5241191@rubyforge.org> Feature Requests item #6898, was opened at 2006-11-26 16:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 Category: None Group: None Status: Closed Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: David Chelimsky (dchelimsky) Summary: Can we separate rspec from the plugins? Initial Comment: I'm trying to use rspec to do my rails development, and a while ago I had found a way to be able to use edge rspec and the plugin. Today I svn uped and to my surprise, the rspec code (not the plugin) ended up downloading three different versions of Rails. Is there any way we can separate the rspec code base from the plugins? If I download trunk, I just want it to be rspec itself...the Rails stuff shouldn't be under it. If I'm in a Rails project, I can install the rspec libs as a plugin, and the Rails plugin separately. Some of you may have seen my article a couple weeks ago about doing that (site is no longer up, sorry). Basically now it's a real pain to try to use edge rspec inside a Rails project. However that's the best way to make updates both to rspec itself and the plugin. If you could make it so they're separated more cleanly, I'd happily bang out Rails related bugs and RFEs as I work on my own Rails apps. ---------------------------------------------------------------------- >Comment By: Pat Maddox (pergesu) Date: 2006-12-13 07:04 Message: Ah, cool, thanks. Lookin forward to submitting some patches soon :) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-13 06:48 Message: Pat - you are getting the entire project for the plugin. What you want is just the plugin: svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugin/rspec_on_rails ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-13 06:21 Message: Also, if I try to run my specs with rake, I get /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- spec/rails (MissingSourceFile) Both trunk edge and the plugin are installed. Edge Rails too ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-13 06:08 Message: Is there any particular reason why the plugin uses externals to pull in Rails 1.1.6, 1.2.0, and edge? Seems pretty heavyweight to me...I don't think it should be pulling in Rails at all. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 08:39 Message: Done in trunk (rev 1260) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-03 00:10 Message: It will probably happen by mid-week. David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-03 00:08 Message: Any idea on when we can do this? I'd really like to get started using edge in my apps ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 16:01 Message: That sounds like a great idea. The only annoyance would be when people who have rspec installed a gem run 'spec' instead of 'script/spec'. If the versions differ, they'll get a warning. Perhaps that warning, which is specific to the rails plugin, should recommend using 'script/spec'??? re: freezing to do this in trunk - I think that's how we should go. Let's just agree on a time a couple of days in advance so that anybody who is working on stuff has plenty of warning. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:58 Message: The only thing here is the spec script. If a Rails app includes RSpec as a plugin, then the spec command will be deep down in vendor/plugins/rspec/bin/spec That's a bit clunky to run from the commandline. Perhaps script/generate rspec should create a script/spec command if vendor/plugins/rspec/bin/spec is present? script/spec would just load vendor/plugins/rspec/bin/spec WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 18:34 Message: iirc, it won't. When you do the mv it simply does an add and delete, and as far as svn is concerned there is no link between the files. So basically if you're planning on doing this, it'd be best for everyone else to freeze until you get it done. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 18:18 Message: Ok, I can drive it. I'll probably do it on a branch. Does anyone know if svn handles a merge back to trunk when files have been moved on the branch and modified on the trunk in the meanwhile? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 18:03 Message: One thing about separating rspec_on_rails and rspec_on_rails_demo. Right now, the specs inside rspec_on_rails won't work w/o the demo in place (because the demo also houses files specifically present for the specs). So, initially, we'd run the specs via the demo, but eventually we want to make the rspec_on_rails tree be complete (i.e. you can run all the specs within that tree). Make sense? Otherwise, this sounds good. I think we should plan a time to do this. Aslak - do you want to drive it? Thanks, David ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:56 Message: On top of svn mv and rake hacking, you'll have to edit all the files that "require 'some_other_file'" to use relative paths. When I was splitting stuff out on my own that's what I had to do...but it's not too bad. The proposed structure is basically exactly what I'd like to see. Makes it really easy to include just what you want, which of course makes it easy to make changes. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 17:40 Message: Reorganising things is the kind of thing that is hard to submit a patch for. It's just a bunch of svn mv (plus a little rake hacking). Let's discuss the proposed layout here. This is my initial suggestion (everything is under trunk) Rakefile # Delegates to sub Rakefiles - for running *all* specs rspec/init.rb # The core - requires the three subprojects, each of which have their own lib and spec dir rspec/expectations rspec/context_runner rspec/mocks jruby/ RSpec.tmbundle/ rspec_on_rails/ rspec_on_rails_demo/ # Could pull in rspec_on_rails via svn:external selenium/ watir/ This organisation would allow Rails projects to install RSpec as 2 Rails plugins: rspec and rspec_on_rails WDYT? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-26 17:18 Message: "And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well." That's what I meant by bang out bugs and RFEs :) I'll go through the list and write patches, as well as come up with whatever other patches I need as I write my Rails app. Just kinda tough with the current structure...any timeline on when things will be cleaner? ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-26 17:13 Message: Absolutely! We've been wanting to restructure things and this is one of the issues under discussion. We'll address this soon. When we're ready to, there will be an email to the list in advance so that those who do prefer to work from source won't be all screwed up by it. And, of course, bugs and RFEs are most welcome. Feel free to contribute patches as well. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6898&group_id=797 From noreply at rubyforge.org Thu Dec 14 02:40:02 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 Dec 2006 02:40:02 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7270 ] RSpec render_partial colliding with simply_helpful Message-ID: <20061214074002.ABED25241B4D@rubyforge.org> Patches item #7270, was opened at 2006-12-13 23:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Goodlad (dgoodlad) Assigned to: Nobody (None) Summary: RSpec render_partial colliding with simply_helpful Initial Comment: I ran into a problem with rspec's overriding render_partial method clashing with simply_helpful. This was discussed briefly on the rspec-users mailing list: http://rubyforge.org/pipermail/rspec-users/2006-December/000322.html I have written a quick patch with specs. The actual code patch only adds one condition, ensuring that the partial_path is a String before attempting to add the view prefix. I am not, however, satisfied with the resulting spec. I tried a variety of methods to spec it out 'nicely', using mocks, testing for exceptions, and others, but because of the code structure I could not come up with a better way to verify the correct behavior. The resulting spec does a similar thing to that which simply_helpful does, chaining render_partial to check for its special cases. In this case, it checks for partial_path being an Array. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 From noreply at rubyforge.org Thu Dec 14 07:05:08 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 Dec 2006 07:05:08 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7270 ] RSpec render_partial colliding with simply_helpful Message-ID: <20061214120508.763735240B4B@rubyforge.org> Patches item #7270, was opened at 2006-12-14 07:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Goodlad (dgoodlad) Assigned to: Nobody (None) Summary: RSpec render_partial colliding with simply_helpful Initial Comment: I ran into a problem with rspec's overriding render_partial method clashing with simply_helpful. This was discussed briefly on the rspec-users mailing list: http://rubyforge.org/pipermail/rspec-users/2006-December/000322.html I have written a quick patch with specs. The actual code patch only adds one condition, ensuring that the partial_path is a String before attempting to add the view prefix. I am not, however, satisfied with the resulting spec. I tried a variety of methods to spec it out 'nicely', using mocks, testing for exceptions, and others, but because of the code structure I could not come up with a better way to verify the correct behavior. The resulting spec does a similar thing to that which simply_helpful does, chaining render_partial to check for its special cases. In this case, it checks for partial_path being an Array. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-14 12:05 Message: David G, I get the following error after adding this patch: Missing template ../app/views/view_spec/partial_with_array.rhtml Can you pls re-patch w/ that file and resubmit? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 From noreply at rubyforge.org Thu Dec 14 11:21:19 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 Dec 2006 11:21:19 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7270 ] RSpec render_partial colliding with simply_helpful Message-ID: <20061214162119.2B504524106D@rubyforge.org> Patches item #7270, was opened at 2006-12-13 23:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Goodlad (dgoodlad) Assigned to: Nobody (None) Summary: RSpec render_partial colliding with simply_helpful Initial Comment: I ran into a problem with rspec's overriding render_partial method clashing with simply_helpful. This was discussed briefly on the rspec-users mailing list: http://rubyforge.org/pipermail/rspec-users/2006-December/000322.html I have written a quick patch with specs. The actual code patch only adds one condition, ensuring that the partial_path is a String before attempting to add the view prefix. I am not, however, satisfied with the resulting spec. I tried a variety of methods to spec it out 'nicely', using mocks, testing for exceptions, and others, but because of the code structure I could not come up with a better way to verify the correct behavior. The resulting spec does a similar thing to that which simply_helpful does, chaining render_partial to check for its special cases. In this case, it checks for partial_path being an Array. ---------------------------------------------------------------------- >Comment By: David Goodlad (dgoodlad) Date: 2006-12-14 08:21 Message: Hi David C Sorry, I broke my normal rule and ran the svn diff before checking status for missing files; I've re-attached the patch with the missing file included. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-14 04:05 Message: David G, I get the following error after adding this patch: Missing template ../app/views/view_spec/partial_with_array.rhtml Can you pls re-patch w/ that file and resubmit? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 From noreply at rubyforge.org Thu Dec 14 16:33:56 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 Dec 2006 16:33:56 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7277 ] [PATCH] Add more usable support for expectations about ActiveRecord errors Message-ID: <20061214213356.D5B575241647@rubyforge.org> Patches item #7277, was opened at 2006-12-14 13:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7277&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] Add more usable support for expectations about ActiveRecord errors Initial Comment: I like being able to write: @model.should_have(1).error_on(:name) or.. @model.should_have(0).errors_on(:some_attribute) This allows me to write specs that don't break when unrelated validations are added later. What I mean by this is that @model.should_be_valid will later blow up even when the particular attribute I am checking is valid, just because I added another feature elsewhere. This all sounds great, except that the @errors collection in ActiveRecord is a recursive data structure, and model.errors.on(:attribute) returns one of three things: 1. nil 2. a single string 3. an array of strings String responds to 'length', so you end up getting "expected 1, found 14", when the error message happens to be 14 characters long. If there are no errors, you get NoMethodError. Long story short, this patch lets you write it the friendly way. I'm using it in several projects, and I thought others might enjoy it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7277&group_id=797 From noreply at rubyforge.org Fri Dec 15 02:51:16 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 15 Dec 2006 02:51:16 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7282 ] dump results even if spec is interruptted Message-ID: <20061215075116.D4F0A5241BAB@rubyforge.org> Patches item #7282, was opened at 2006-12-15 16:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7282&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Kouhei Sutou (kou) Assigned to: Nobody (None) Summary: dump results even if spec is interruptted Initial Comment: I have specs which spend 10secs~20secs to run all specs. I want to look details of a failure/error if any 'F'/'E' is output as soon as possible. I can't wait that all specs are finished. It may spent 10secs after the first failure or error is reported as 'F' or 'E'. It's my suggestion that Interrupt exception terminate specs and dump results even if specs to run still exist. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7282&group_id=797 From noreply at rubyforge.org Fri Dec 15 08:13:43 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 15 Dec 2006 08:13:43 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7282 ] dump results even if spec is interruptted Message-ID: <20061215131343.64CA45240B8E@rubyforge.org> Patches item #7282, was opened at 2006-12-15 02:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7282&group_id=797 Category: runner module Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Kouhei Sutou (kou) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: dump results even if spec is interruptted Initial Comment: I have specs which spend 10secs~20secs to run all specs. I want to look details of a failure/error if any 'F'/'E' is output as soon as possible. I can't wait that all specs are finished. It may spent 10secs after the first failure or error is reported as 'F' or 'E'. It's my suggestion that Interrupt exception terminate specs and dump results even if specs to run still exist. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-15 08:13 Message: Great patch. I'll commit it as soon as possible. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7282&group_id=797 From noreply at rubyforge.org Fri Dec 15 12:23:43 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 15 Dec 2006 12:23:43 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7270 ] RSpec render_partial colliding with simply_helpful Message-ID: <20061215172343.3D61652413C1@rubyforge.org> Patches item #7270, was opened at 2006-12-14 07:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: David Goodlad (dgoodlad) Assigned to: Nobody (None) Summary: RSpec render_partial colliding with simply_helpful Initial Comment: I ran into a problem with rspec's overriding render_partial method clashing with simply_helpful. This was discussed briefly on the rspec-users mailing list: http://rubyforge.org/pipermail/rspec-users/2006-December/000322.html I have written a quick patch with specs. The actual code patch only adds one condition, ensuring that the partial_path is a String before attempting to add the view prefix. I am not, however, satisfied with the resulting spec. I tried a variety of methods to spec it out 'nicely', using mocks, testing for exceptions, and others, but because of the code structure I could not come up with a better way to verify the correct behavior. The resulting spec does a similar thing to that which simply_helpful does, chaining render_partial to check for its special cases. In this case, it checks for partial_path being an Array. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-15 17:23 Message: Applied in trunk (1290) ---------------------------------------------------------------------- Comment By: David Goodlad (dgoodlad) Date: 2006-12-14 16:21 Message: Hi David C Sorry, I broke my normal rule and ran the svn diff before checking status for missing files; I've re-attached the patch with the missing file included. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-14 12:05 Message: David G, I get the following error after adding this patch: Missing template ../app/views/view_spec/partial_with_array.rhtml Can you pls re-patch w/ that file and resubmit? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 From noreply at rubyforge.org Fri Dec 15 12:23:56 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 15 Dec 2006 12:23:56 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7270 ] RSpec render_partial colliding with simply_helpful Message-ID: <20061215172356.D26D152413F1@rubyforge.org> Patches item #7270, was opened at 2006-12-14 07:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: David Goodlad (dgoodlad) >Assigned to: David Chelimsky (dchelimsky) Summary: RSpec render_partial colliding with simply_helpful Initial Comment: I ran into a problem with rspec's overriding render_partial method clashing with simply_helpful. This was discussed briefly on the rspec-users mailing list: http://rubyforge.org/pipermail/rspec-users/2006-December/000322.html I have written a quick patch with specs. The actual code patch only adds one condition, ensuring that the partial_path is a String before attempting to add the view prefix. I am not, however, satisfied with the resulting spec. I tried a variety of methods to spec it out 'nicely', using mocks, testing for exceptions, and others, but because of the code structure I could not come up with a better way to verify the correct behavior. The resulting spec does a similar thing to that which simply_helpful does, chaining render_partial to check for its special cases. In this case, it checks for partial_path being an Array. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-15 17:23 Message: Applied in trunk (1290) ---------------------------------------------------------------------- Comment By: David Goodlad (dgoodlad) Date: 2006-12-14 16:21 Message: Hi David C Sorry, I broke my normal rule and ran the svn diff before checking status for missing files; I've re-attached the patch with the missing file included. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-14 12:05 Message: David G, I get the following error after adding this patch: Missing template ../app/views/view_spec/partial_with_array.rhtml Can you pls re-patch w/ that file and resubmit? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7270&group_id=797 From noreply at rubyforge.org Sat Dec 16 09:36:03 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 09:36:03 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7277 ] [PATCH] Add more usable support for expectations about ActiveRecord errors Message-ID: <20061216143603.E6FCA524106E@rubyforge.org> Patches item #7277, was opened at 2006-12-14 21:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7277&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] Add more usable support for expectations about ActiveRecord errors Initial Comment: I like being able to write: @model.should_have(1).error_on(:name) or.. @model.should_have(0).errors_on(:some_attribute) This allows me to write specs that don't break when unrelated validations are added later. What I mean by this is that @model.should_be_valid will later blow up even when the particular attribute I am checking is valid, just because I added another feature elsewhere. This all sounds great, except that the @errors collection in ActiveRecord is a recursive data structure, and model.errors.on(:attribute) returns one of three things: 1. nil 2. a single string 3. an array of strings String responds to 'length', so you end up getting "expected 1, found 14", when the error message happens to be 14 characters long. If there are no errors, you get NoMethodError. Long story short, this patch lets you write it the friendly way. I'm using it in several projects, and I thought others might enjoy it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-16 14:36 Message: Applied in trunk (rev 1292) Nice patch Wilson! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7277&group_id=797 From noreply at rubyforge.org Sat Dec 16 09:36:30 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 09:36:30 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7277 ] [PATCH] Add more usable support for expectations about ActiveRecord errors Message-ID: <20061216143630.E3F6E524106E@rubyforge.org> Patches item #7277, was opened at 2006-12-14 21:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7277&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Wilson Bilkovich (wilson) >Assigned to: David Chelimsky (dchelimsky) Summary: [PATCH] Add more usable support for expectations about ActiveRecord errors Initial Comment: I like being able to write: @model.should_have(1).error_on(:name) or.. @model.should_have(0).errors_on(:some_attribute) This allows me to write specs that don't break when unrelated validations are added later. What I mean by this is that @model.should_be_valid will later blow up even when the particular attribute I am checking is valid, just because I added another feature elsewhere. This all sounds great, except that the @errors collection in ActiveRecord is a recursive data structure, and model.errors.on(:attribute) returns one of three things: 1. nil 2. a single string 3. an array of strings String responds to 'length', so you end up getting "expected 1, found 14", when the error message happens to be 14 characters long. If there are no errors, you get NoMethodError. Long story short, this patch lets you write it the friendly way. I'm using it in several projects, and I thought others might enjoy it. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-16 14:36 Message: Applied in trunk (rev 1292) Nice patch Wilson! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7277&group_id=797 From noreply at rubyforge.org Sat Dec 16 19:01:02 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 19:01:02 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7282 ] dump results even if spec is interruptted Message-ID: <20061217000102.79E42524123C@rubyforge.org> Patches item #7282, was opened at 2006-12-15 02:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7282&group_id=797 Category: runner module Group: None >Status: Closed Resolution: Accepted Priority: 3 Submitted By: Kouhei Sutou (kou) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: dump results even if spec is interruptted Initial Comment: I have specs which spend 10secs~20secs to run all specs. I want to look details of a failure/error if any 'F'/'E' is output as soon as possible. I can't wait that all specs are finished. It may spent 10secs after the first failure or error is reported as 'F' or 'E'. It's my suggestion that Interrupt exception terminate specs and dump results even if specs to run still exist. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-16 19:01 Message: Thanks! Applied on trunk r1295 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-15 08:13 Message: Great patch. I'll commit it as soon as possible. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7282&group_id=797 From noreply at rubyforge.org Sat Dec 16 21:26:24 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 21:26:24 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061217022624.EEF3C52416E0@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 23:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 02:26 Message: Yes, it works if with an equivalent Test::Unit test. The app doesn't even seem to get to the spec. It looks like it fails when loading application.rb where the audit Address is. It seems that require_or_load in rails dependencies.rb:76 attempts to require address.rb, then as soon as it loads, it tries again. It kicks out on the double load attempt. Again, if I comment out the audit Address call in application.rb, the spec runs just fine and passes. The application runs fine in the browser with webrick. Thanks for your help and let me know how I can better provide information. More of the trace: /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:245:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:446:in `const_missing' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:458:in `const_missing' from /Users/bradleychase/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing' from /Users/me/Website/theproject/config/../app/controllers/application.rb:5 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:336:in `new_constants_in' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' ... 18 levels... from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:21:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:15:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec:4 from /opt/local/bin/spec:18 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-11 00:45 Message: Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From noreply at rubyforge.org Sat Dec 16 21:48:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 21:48:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061217024858.76AF05241C4F@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 23:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-16 21:48 Message: I installed the acts_as_audited plugin, ran the migration for Person, modified application.rb (as below) to application.rb and all the specs ran fine. class ApplicationController < ActionController::Base audit Person end Can you please provide a patch against the current rspec trunk revision that causes this error to happen? ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-16 21:26 Message: Yes, it works if with an equivalent Test::Unit test. The app doesn't even seem to get to the spec. It looks like it fails when loading application.rb where the audit Address is. It seems that require_or_load in rails dependencies.rb:76 attempts to require address.rb, then as soon as it loads, it tries again. It kicks out on the double load attempt. Again, if I comment out the audit Address call in application.rb, the spec runs just fine and passes. The application runs fine in the browser with webrick. Thanks for your help and let me know how I can better provide information. More of the trace: /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:245:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:446:in `const_missing' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:458:in `const_missing' from /Users/bradleychase/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing' from /Users/me/Website/theproject/config/../app/controllers/application.rb:5 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:336:in `new_constants_in' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' ... 18 levels... from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:21:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:15:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec:4 from /opt/local/bin/spec:18 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-10 19:45 Message: Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From noreply at rubyforge.org Sat Dec 16 22:14:30 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 22:14:30 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061217031430.2356B5241C4E@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 23:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 03:14 Message: Sure, I can try. Are there any resources for how to do that? I'm fairly green in that regard. Follow this http://rubyforge.org/pipermail/rspec-users/2006-November/000135.html to get it installed? In that I should be on trunk of rspec and the rails plugin? Then try to write a test case to make it fail? Thanks again! ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-17 02:48 Message: I installed the acts_as_audited plugin, ran the migration for Person, modified application.rb (as below) to application.rb and all the specs ran fine. class ApplicationController < ActionController::Base audit Person end Can you please provide a patch against the current rspec trunk revision that causes this error to happen? ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 02:26 Message: Yes, it works if with an equivalent Test::Unit test. The app doesn't even seem to get to the spec. It looks like it fails when loading application.rb where the audit Address is. It seems that require_or_load in rails dependencies.rb:76 attempts to require address.rb, then as soon as it loads, it tries again. It kicks out on the double load attempt. Again, if I comment out the audit Address call in application.rb, the spec runs just fine and passes. The application runs fine in the browser with webrick. Thanks for your help and let me know how I can better provide information. More of the trace: /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:245:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:446:in `const_missing' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:458:in `const_missing' from /Users/bradleychase/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing' from /Users/me/Website/theproject/config/../app/controllers/application.rb:5 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:336:in `new_constants_in' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' ... 18 levels... from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:21:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:15:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec:4 from /opt/local/bin/spec:18 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-11 00:45 Message: Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From noreply at rubyforge.org Sat Dec 16 22:57:50 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 16 Dec 2006 22:57:50 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061217035752.04C6E5241C5C@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 23:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 03:57 Message: Actually, looks like the problem is not rspec related. Feel free to close this ticket. It looks like the load order of plugins is messing things up. Thanks for your help! ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 03:14 Message: Sure, I can try. Are there any resources for how to do that? I'm fairly green in that regard. Follow this http://rubyforge.org/pipermail/rspec-users/2006-November/000135.html to get it installed? In that I should be on trunk of rspec and the rails plugin? Then try to write a test case to make it fail? Thanks again! ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-17 02:48 Message: I installed the acts_as_audited plugin, ran the migration for Person, modified application.rb (as below) to application.rb and all the specs ran fine. class ApplicationController < ActionController::Base audit Person end Can you please provide a patch against the current rspec trunk revision that causes this error to happen? ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 02:26 Message: Yes, it works if with an equivalent Test::Unit test. The app doesn't even seem to get to the spec. It looks like it fails when loading application.rb where the audit Address is. It seems that require_or_load in rails dependencies.rb:76 attempts to require address.rb, then as soon as it loads, it tries again. It kicks out on the double load attempt. Again, if I comment out the audit Address call in application.rb, the spec runs just fine and passes. The application runs fine in the browser with webrick. Thanks for your help and let me know how I can better provide information. More of the trace: /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:245:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:446:in `const_missing' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:458:in `const_missing' from /Users/bradleychase/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing' from /Users/me/Website/theproject/config/../app/controllers/application.rb:5 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:336:in `new_constants_in' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' ... 18 levels... from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:21:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:15:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec:4 from /opt/local/bin/spec:18 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-11 00:45 Message: Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From noreply at rubyforge.org Sun Dec 17 02:49:32 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 17 Dec 2006 02:49:32 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb Message-ID: <20061217074932.51B2B5241057@rubyforge.org> Bugs item #7206, was opened at 2006-12-10 23:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: spec crashes if Model class referenced in application.rb Initial Comment: I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails. application.rb: class ApplicationController < ActionController::Base audit Address end where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited). ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) If I comment out the audit declaration, the spec runs and passes as expected. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-17 07:49 Message: Sure. Thanks for using rspec. Cheers, David ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 03:57 Message: Actually, looks like the problem is not rspec related. Feel free to close this ticket. It looks like the load order of plugins is messing things up. Thanks for your help! ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 03:14 Message: Sure, I can try. Are there any resources for how to do that? I'm fairly green in that regard. Follow this http://rubyforge.org/pipermail/rspec-users/2006-November/000135.html to get it installed? In that I should be on trunk of rspec and the rails plugin? Then try to write a test case to make it fail? Thanks again! ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-17 02:48 Message: I installed the acts_as_audited plugin, ran the migration for Person, modified application.rb (as below) to application.rb and all the specs ran fine. class ApplicationController < ActionController::Base audit Person end Can you please provide a patch against the current rspec trunk revision that causes this error to happen? ---------------------------------------------------------------------- Comment By: Brad Chase (bchase) Date: 2006-12-17 02:26 Message: Yes, it works if with an equivalent Test::Unit test. The app doesn't even seem to get to the spec. It looks like it fails when loading application.rb where the audit Address is. It seems that require_or_load in rails dependencies.rb:76 attempts to require address.rb, then as soon as it loads, it tries again. It kicks out on the double load attempt. Again, if I comment out the audit Address call in application.rb, the spec runs just fine and passes. The application runs fine in the browser with webrick. Thanks for your help and let me know how I can better provide information. More of the trace: /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:245:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError) from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:446:in `const_missing' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:458:in `const_missing' from /Users/bradleychase/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing' from /Users/me/Website/theproject/config/../app/controllers/application.rb:5 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:336:in `new_constants_in' from /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:489:in `require' ... 18 levels... from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:21:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:15:in `run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec:4 from /opt/local/bin/spec:18 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-11 00:45 Message: Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797 From pergesu at gmail.com Sun Dec 17 03:33:28 2006 From: pergesu at gmail.com (Pat Maddox) Date: Sun, 17 Dec 2006 01:33:28 -0700 Subject: [rspec-devel] Contributing to the Rails plugin...I think I might just be dumb Message-ID: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> I wanted to add some stuff to the Rails plugin. afaik, I need to get the entire rspec_on_rails application in order to do that. So I did svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/ That gets the application, the various versions of rails, etc. I create the database.yml file and run migrations. ./script/generate rspec. So far so good. rake spec give me that version error RSpec : 0.7.4 (r1201) RSpec on Rails : r1312 Okay, I'll install edge rspec then. ./script/plugin install -x svn://rubyforge.org/var/svn/rspec/trunk/rspec Still getting the exact same error. For some reason it's not recognizing the edge rspec that I just installed. I'm running edge rspec and rspec_on_rails in another application without any problems. Am I even going about this the right way? I feel so dumb...I write Rails apps all day long, now I want to contribute to RSpec and I've just been having a hell of a time getting started. Pat From wilsonb at gmail.com Sun Dec 17 03:48:19 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Sun, 17 Dec 2006 03:48:19 -0500 Subject: [rspec-devel] Contributing to the Rails plugin...I think I might just be dumb In-Reply-To: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> References: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> Message-ID: On 12/17/06, Pat Maddox wrote: > I wanted to add some stuff to the Rails plugin. afaik, I need to get > the entire rspec_on_rails application in order to do that. So I did > svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/ > > That gets the application, the various versions of rails, etc. I > create the database.yml file and run migrations. ./script/generate > rspec. So far so good. > > rake spec give me that version error > RSpec : 0.7.4 (r1201) > RSpec on Rails : r1312 > > Okay, I'll install edge rspec then. > ./script/plugin install -x svn://rubyforge.org/var/svn/rspec/trunk/rspec > > Still getting the exact same error. For some reason it's not > recognizing the edge rspec that I just installed. I'm running edge > rspec and rspec_on_rails in another application without any problems. > > Am I even going about this the right way? I feel so dumb...I write > Rails apps all day long, now I want to contribute to RSpec and I've > just been having a hell of a time getting started. > If you check out /var/svn/rspec/trunk/rspec.. You can build and install the gem from that, and then your gem version will match the rspec_on_rails version. It's pretty irritating, but I can't think of a better way. From pergesu at gmail.com Sun Dec 17 04:05:04 2006 From: pergesu at gmail.com (Pat Maddox) Date: Sun, 17 Dec 2006 02:05:04 -0700 Subject: [rspec-devel] Contributing to the Rails plugin...I think I might just be dumb In-Reply-To: References: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> Message-ID: <810a540e0612170105ja2f3078h62142bcb313dc357@mail.gmail.com> On 12/17/06, Wilson Bilkovich wrote: > On 12/17/06, Pat Maddox wrote: > > I wanted to add some stuff to the Rails plugin. afaik, I need to get > > the entire rspec_on_rails application in order to do that. So I did > > svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/ > > > > That gets the application, the various versions of rails, etc. I > > create the database.yml file and run migrations. ./script/generate > > rspec. So far so good. > > > > rake spec give me that version error > > RSpec : 0.7.4 (r1201) > > RSpec on Rails : r1312 > > > > Okay, I'll install edge rspec then. > > ./script/plugin install -x svn://rubyforge.org/var/svn/rspec/trunk/rspec > > > > Still getting the exact same error. For some reason it's not > > recognizing the edge rspec that I just installed. I'm running edge > > rspec and rspec_on_rails in another application without any problems. > > > > Am I even going about this the right way? I feel so dumb...I write > > Rails apps all day long, now I want to contribute to RSpec and I've > > just been having a hell of a time getting started. > > > > If you check out /var/svn/rspec/trunk/rspec.. > You can build and install the gem from that, and then your gem version > will match the rspec_on_rails version. > It's pretty irritating, but I can't think of a better way. Well what really gets me is that I don't have to do that in any of my other Rails apps. I checked out /var/svn/rspec/trunk/rspec into vendor/plugins, and have the edge rspec_on_rails plugin as well. That works fine without having to build a gem...so I don't understand why it's different in the example app. Pat From dchelimsky at gmail.com Sun Dec 17 09:18:25 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Sun, 17 Dec 2006 08:18:25 -0600 Subject: [rspec-devel] Contributing to the Rails plugin...I think I might just be dumb In-Reply-To: <810a540e0612170105ja2f3078h62142bcb313dc357@mail.gmail.com> References: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> <810a540e0612170105ja2f3078h62142bcb313dc357@mail.gmail.com> Message-ID: <57c63afe0612170618l226f4075u32913650d482cf30@mail.gmail.com> On 12/17/06, Pat Maddox wrote: > On 12/17/06, Wilson Bilkovich wrote: > > On 12/17/06, Pat Maddox wrote: > > > I wanted to add some stuff to the Rails plugin. afaik, I need to get > > > the entire rspec_on_rails application in order to do that. So I did > > > svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/ > > > > > > That gets the application, the various versions of rails, etc. I > > > create the database.yml file and run migrations. ./script/generate > > > rspec. So far so good. > > > > > > rake spec give me that version error > > > RSpec : 0.7.4 (r1201) > > > RSpec on Rails : r1312 > > > > > > Okay, I'll install edge rspec then. > > > ./script/plugin install -x svn://rubyforge.org/var/svn/rspec/trunk/rspec > > > > > > Still getting the exact same error. For some reason it's not > > > recognizing the edge rspec that I just installed. I'm running edge > > > rspec and rspec_on_rails in another application without any problems. > > > > > > Am I even going about this the right way? I feel so dumb...I write > > > Rails apps all day long, now I want to contribute to RSpec and I've > > > just been having a hell of a time getting started. > > > > > > > If you check out /var/svn/rspec/trunk/rspec.. > > You can build and install the gem from that, and then your gem version > > will match the rspec_on_rails version. > > It's pretty irritating, but I can't think of a better way. > > Well what really gets me is that I don't have to do that in any of my > other Rails apps. I checked out /var/svn/rspec/trunk/rspec into > vendor/plugins, and have the edge rspec_on_rails plugin as well. That > works fine without having to build a gem...so I don't understand why > it's different in the example app. Sorry this is so frustrating for you guys. We certainly don't want roadblocks like this in the way of you making contributions. In the demo app we've got paths set up such that it loads the rspec that lives parallel to the app. i.e. ~/trunk/rspec_on_rails ~/trunk/rspec That's how we ensure that we're working on the same revision. So I'd recommend checking out the entire trunk. It's a bit of a download hit, but it should work. Let us know if you have any suggestions for a better way. Cheers, David > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From pergesu at gmail.com Sun Dec 17 09:59:57 2006 From: pergesu at gmail.com (Pat Maddox) Date: Sun, 17 Dec 2006 07:59:57 -0700 Subject: [rspec-devel] Contributing to the Rails plugin...I think I might just be dumb In-Reply-To: <57c63afe0612170618l226f4075u32913650d482cf30@mail.gmail.com> References: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> <810a540e0612170105ja2f3078h62142bcb313dc357@mail.gmail.com> <57c63afe0612170618l226f4075u32913650d482cf30@mail.gmail.com> Message-ID: <810a540e0612170659m2118e91bha1a630af0e8bc120@mail.gmail.com> On 12/17/06, David Chelimsky wrote: > On 12/17/06, Pat Maddox wrote: > > On 12/17/06, Wilson Bilkovich wrote: > > > On 12/17/06, Pat Maddox wrote: > > > > I wanted to add some stuff to the Rails plugin. afaik, I need to get > > > > the entire rspec_on_rails application in order to do that. So I did > > > > svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/ > > > > > > > > That gets the application, the various versions of rails, etc. I > > > > create the database.yml file and run migrations. ./script/generate > > > > rspec. So far so good. > > > > > > > > rake spec give me that version error > > > > RSpec : 0.7.4 (r1201) > > > > RSpec on Rails : r1312 > > > > > > > > Okay, I'll install edge rspec then. > > > > ./script/plugin install -x svn://rubyforge.org/var/svn/rspec/trunk/rspec > > > > > > > > Still getting the exact same error. For some reason it's not > > > > recognizing the edge rspec that I just installed. I'm running edge > > > > rspec and rspec_on_rails in another application without any problems. > > > > > > > > Am I even going about this the right way? I feel so dumb...I write > > > > Rails apps all day long, now I want to contribute to RSpec and I've > > > > just been having a hell of a time getting started. > > > > > > > > > > If you check out /var/svn/rspec/trunk/rspec.. > > > You can build and install the gem from that, and then your gem version > > > will match the rspec_on_rails version. > > > It's pretty irritating, but I can't think of a better way. > > > > Well what really gets me is that I don't have to do that in any of my > > other Rails apps. I checked out /var/svn/rspec/trunk/rspec into > > vendor/plugins, and have the edge rspec_on_rails plugin as well. That > > works fine without having to build a gem...so I don't understand why > > it's different in the example app. > > Sorry this is so frustrating for you guys. We certainly don't want > roadblocks like this in the way of you making contributions. While I haven't really contributed anything, I like to think that my series of complaints has at least led to it being a bit easier to contribute :) > In the demo app we've got paths set up such that it loads the rspec > that lives parallel to the app. i.e. > > ~/trunk/rspec_on_rails > ~/trunk/rspec > > That's how we ensure that we're working on the same revision. Awesome, got it working now. > So I'd recommend checking out the entire trunk. It's a bit of a > download hit, but it should work. > > Let us know if you have any suggestions for a better way. Seems like the best solution at this point. Thanks, Pat From noreply at rubyforge.org Sun Dec 17 10:01:34 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 17 Dec 2006 10:01:34 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7319 ] Migration code uses drop_column when it should use remove_column Message-ID: <20061217150134.BC9675240E0D@rubyforge.org> Bugs item #7319, was opened at 2006-12-17 08:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7319&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: Migration code uses drop_column when it should use remove_column Initial Comment: The migration method to drop a column is remove_column. Migrating down from version 003 fails. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7319&group_id=797 From dchelimsky at gmail.com Sun Dec 17 10:35:57 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Sun, 17 Dec 2006 09:35:57 -0600 Subject: [rspec-devel] Contributing to the Rails plugin...I think I might just be dumb In-Reply-To: <810a540e0612170659m2118e91bha1a630af0e8bc120@mail.gmail.com> References: <810a540e0612170033r745610ffi687a1881f3a33d8b@mail.gmail.com> <810a540e0612170105ja2f3078h62142bcb313dc357@mail.gmail.com> <57c63afe0612170618l226f4075u32913650d482cf30@mail.gmail.com> <810a540e0612170659m2118e91bha1a630af0e8bc120@mail.gmail.com> Message-ID: <57c63afe0612170735u42a1afc4na18fe4808bc73924@mail.gmail.com> On 12/17/06, Pat Maddox wrote: > On 12/17/06, David Chelimsky wrote: > > On 12/17/06, Pat Maddox wrote: > > > On 12/17/06, Wilson Bilkovich wrote: > > > > On 12/17/06, Pat Maddox wrote: > > > > > I wanted to add some stuff to the Rails plugin. afaik, I need to get > > > > > the entire rspec_on_rails application in order to do that. So I did > > > > > svn co svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/ > > > > > > > > > > That gets the application, the various versions of rails, etc. I > > > > > create the database.yml file and run migrations. ./script/generate > > > > > rspec. So far so good. > > > > > > > > > > rake spec give me that version error > > > > > RSpec : 0.7.4 (r1201) > > > > > RSpec on Rails : r1312 > > > > > > > > > > Okay, I'll install edge rspec then. > > > > > ./script/plugin install -x svn://rubyforge.org/var/svn/rspec/trunk/rspec > > > > > > > > > > Still getting the exact same error. For some reason it's not > > > > > recognizing the edge rspec that I just installed. I'm running edge > > > > > rspec and rspec_on_rails in another application without any problems. > > > > > > > > > > Am I even going about this the right way? I feel so dumb...I write > > > > > Rails apps all day long, now I want to contribute to RSpec and I've > > > > > just been having a hell of a time getting started. > > > > > > > > > > > > > If you check out /var/svn/rspec/trunk/rspec.. > > > > You can build and install the gem from that, and then your gem version > > > > will match the rspec_on_rails version. > > > > It's pretty irritating, but I can't think of a better way. > > > > > > Well what really gets me is that I don't have to do that in any of my > > > other Rails apps. I checked out /var/svn/rspec/trunk/rspec into > > > vendor/plugins, and have the edge rspec_on_rails plugin as well. That > > > works fine without having to build a gem...so I don't understand why > > > it's different in the example app. > > > > Sorry this is so frustrating for you guys. We certainly don't want > > roadblocks like this in the way of you making contributions. > > While I haven't really contributed anything, I like to think that my > series of complaints has at least led to it being a bit easier to > contribute :) Complaints? I see nothing but constructive criticism ;) You've contributed much, and its appreciated. > > > In the demo app we've got paths set up such that it loads the rspec > > that lives parallel to the app. i.e. > > > > ~/trunk/rspec_on_rails > > ~/trunk/rspec > > > > That's how we ensure that we're working on the same revision. > > Awesome, got it working now. Cool. > > > So I'd recommend checking out the entire trunk. It's a bit of a > > download hit, but it should work. > > > > Let us know if you have any suggestions for a better way. > > Seems like the best solution at this point. As long as its working, yes. Thanks, David > > Thanks, > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Sun Dec 17 10:44:25 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 17 Dec 2006 10:44:25 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7319 ] Migration code uses drop_column when it should use remove_column Message-ID: <20061217154425.B18085240E80@rubyforge.org> Bugs item #7319, was opened at 2006-12-17 15:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7319&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Pat Maddox (pergesu) >Assigned to: David Chelimsky (dchelimsky) Summary: Migration code uses drop_column when it should use remove_column Initial Comment: The migration method to drop a column is remove_column. Migrating down from version 003 fails. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-17 15:44 Message: Applied patch to trunk (lucky rev 1313) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7319&group_id=797 From noreply at rubyforge.org Sun Dec 17 11:04:34 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 17 Dec 2006 11:04:34 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7320 ] [PATCH] Allow XHR requests in controller specs to render RJS templates Message-ID: <20061217160434.B43CC5240E80@rubyforge.org> Feature Requests item #7320, was opened at 2006-12-17 09:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7320&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: [PATCH] Allow XHR requests in controller specs to render RJS templates Initial Comment: Say we want the action def some_action respond_to do |format| format.html format.js end end It'll return format.js if you send it an XHR request. specify "a 'should_render' expectation should support an Ajax request and RJS template" do controller.should_render :template => 'render_spec/some_action.rjs' xhr :post, 'some_action' end That seems like a reasonable way to do this. WDYT? Patch makes it happen. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7320&group_id=797 From noreply at rubyforge.org Sun Dec 17 11:07:01 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 17 Dec 2006 11:07:01 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7320 ] [PATCH] Allow XHR requests in controller specs to render RJS templates Message-ID: <20061217160701.952565240E80@rubyforge.org> Feature Requests item #7320, was opened at 2006-12-17 09:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7320&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: [PATCH] Allow XHR requests in controller specs to render RJS templates Initial Comment: Say we want the action def some_action respond_to do |format| format.html format.js end end It'll return format.js if you send it an XHR request. specify "a 'should_render' expectation should support an Ajax request and RJS template" do controller.should_render :template => 'render_spec/some_action.rjs' xhr :post, 'some_action' end That seems like a reasonable way to do this. WDYT? Patch makes it happen. ---------------------------------------------------------------------- >Comment By: Pat Maddox (pergesu) Date: 2006-12-17 09:07 Message: er, it'll return some_action.rjs (as the spec shows). Sorry for any confusion. Also I dunno if the patch should be applied and committed...just sharing it to get some feedback. Works just fine in my project. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7320&group_id=797 From noreply at rubyforge.org Mon Dec 18 07:23:23 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 07:23:23 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7320 ] [PATCH] Allow XHR requests in controller specs to render RJS templates Message-ID: <20061218122323.70CE852410B3@rubyforge.org> Feature Requests item #7320, was opened at 2006-12-17 16:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7320&group_id=797 >Category: rails plugin Group: None >Status: Deleted Priority: 3 Submitted By: Pat Maddox (pergesu) >Assigned to: David Chelimsky (dchelimsky) Summary: [PATCH] Allow XHR requests in controller specs to render RJS templates Initial Comment: Say we want the action def some_action respond_to do |format| format.html format.js end end It'll return format.js if you send it an XHR request. specify "a 'should_render' expectation should support an Ajax request and RJS template" do controller.should_render :template => 'render_spec/some_action.rjs' xhr :post, 'some_action' end That seems like a reasonable way to do this. WDYT? Patch makes it happen. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-18 12:23 Message: And it works just fine in ours... Committed to trunk (rev 1322) ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-17 16:07 Message: er, it'll return some_action.rjs (as the spec shows). Sorry for any confusion. Also I dunno if the patch should be applied and committed...just sharing it to get some feedback. Works just fine in my project. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7320&group_id=797 From noreply at rubyforge.org Mon Dec 18 08:30:43 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 08:30:43 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7234 ] The Rcov rake task fails when running the specs Message-ID: <20061218133043.E6A505241158@rubyforge.org> Bugs item #7234, was opened at 2006-12-12 13:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 Category: rails plugin Group: None Status: Open Resolution: Accepted Priority: 3 Submitted By: Clint Bishop (norobotdiving) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: The Rcov rake task fails when running the specs Initial Comment: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh > build/spec_results.html"] end I get this error: $ rake spec_rcov --trace (in /Users/tworker1/projects/disco_stu/trunk/disco_stu) ** Invoke ci (first_time) ** Invoke testing (first_time) ** Execute testing ** Invoke migrate (first_time) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute migrate ** Invoke spec_rcov (first_time) ** Invoke clobber_spec_rcov (first_time) ** Execute clobber_spec_rcov rm -r coverage ** Execute spec_rcov /usr/local/bin/ruby -I"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" -S rcov --exclude lib\/spec,bin\/spec -o "coverage" "/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" -- "spec/controllers/citycliq_controller_spec.rb" "spec/helpers/citycliq_helper_spec.rb" "spec/models/event_spec.rb" "spec/models/hotspot_spec.rb" "spec/views/citycliq/create_event_spec.rb" "spec/views/citycliq/create_hotspot_spec.rb" "spec/views/citycliq/index_spec.rb" "spec/views/citycliq/login_spec.rb" "spec/views/citycliq/view_event_detail_spec.rb" "spec/views/citycliq/view_events_spec.rb" "spec/views/citycliq/view_hotspot_detail_spec.rb" "spec/views/citycliq/view_hotspots_spec.rb" -fh > build/spec_results.html /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] rake aborted! Command failed with status (134): [/usr/local/bin/ruby -I"/usr/local/lib/ruby...] /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:131:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:831:in `verbose' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:110:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/local/bin/rake:18 Same error I get if I just run the specs through rcov: $ rcov spec/**/*spec.rb ........../usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] Abort trap But I don't get the error if I turn off rcov's optimized C runtime $ rcov spec/**/*spec.rb --no-rcovrt .................................... Finished in 12.125441 seconds 36 specifications, 0 failures I've noticed that if there aren't too many specs then it runs just fine. Once we pass a certain number we get the error listed above. We're using: OS X 10.4.8 1.5 GHz Intel Core Solo 1Gb ram rcov 0.7.0 rcov rails plugin installed as an external svn repos (so it's on edge) rspec 0.7.4 rspec rails plugin for 0.7.4 rails 1.1.6 Ruby 1.8.4 ---------------------------------------------------------------------- >Comment By: Clint Bishop (norobotdiving) Date: 2006-12-18 13:30 Message: We tried changing our rake task and still got the same error: /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-12 19:46 Message: Try this instead: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh"] t.out = "build/spec_results.html" end Also see http://rspec.rubyforge.org/rdoc/classes/Spec/Rake/SpecTask.html Does that work for you? If you still get a BUS error I'd take it up with Mauricio Fernandez (the rcov author) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 From noreply at rubyforge.org Mon Dec 18 08:34:36 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 08:34:36 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7339 ] Turn off caching in HTML reports Message-ID: <20061218133436.63FA152411D0@rubyforge.org> Patches item #7339, was opened at 2006-12-18 08:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Aslak Helles?y (aslak_hellesoy) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Turn off caching in HTML reports Initial Comment: This needs to go in the header: ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 From noreply at rubyforge.org Mon Dec 18 08:43:19 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 08:43:19 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7339 ] Turn off caching in HTML reports Message-ID: <20061218134319.D870C52411CF@rubyforge.org> Patches item #7339, was opened at 2006-12-18 08:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Aslak Helles?y (aslak_hellesoy) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Turn off caching in HTML reports Initial Comment: This needs to go in the header: ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 08:43 Message: There should also be a hook to add custom headers, like (auto-refresh every 10 seconds) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 From noreply at rubyforge.org Mon Dec 18 13:30:11 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 13:30:11 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7234 ] The Rcov rake task fails when running the specs Message-ID: <20061218183011.F04D652411D1@rubyforge.org> Bugs item #7234, was opened at 2006-12-12 08:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Clint Bishop (norobotdiving) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: The Rcov rake task fails when running the specs Initial Comment: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh > build/spec_results.html"] end I get this error: $ rake spec_rcov --trace (in /Users/tworker1/projects/disco_stu/trunk/disco_stu) ** Invoke ci (first_time) ** Invoke testing (first_time) ** Execute testing ** Invoke migrate (first_time) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute migrate ** Invoke spec_rcov (first_time) ** Invoke clobber_spec_rcov (first_time) ** Execute clobber_spec_rcov rm -r coverage ** Execute spec_rcov /usr/local/bin/ruby -I"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib" -S rcov --exclude lib\/spec,bin\/spec -o "coverage" "/usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec" -- "spec/controllers/citycliq_controller_spec.rb" "spec/helpers/citycliq_helper_spec.rb" "spec/models/event_spec.rb" "spec/models/hotspot_spec.rb" "spec/views/citycliq/create_event_spec.rb" "spec/views/citycliq/create_hotspot_spec.rb" "spec/views/citycliq/index_spec.rb" "spec/views/citycliq/login_spec.rb" "spec/views/citycliq/view_event_detail_spec.rb" "spec/views/citycliq/view_events_spec.rb" "spec/views/citycliq/view_hotspot_detail_spec.rb" "spec/views/citycliq/view_hotspots_spec.rb" -fh > build/spec_results.html /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] rake aborted! Command failed with status (134): [/usr/local/bin/ruby -I"/usr/local/lib/ruby...] /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:807:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:131:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:831:in `verbose' /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/rake/spectask.rb:110:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/local/bin/rake:18 Same error I get if I just run the specs through rcov: $ rcov spec/**/*spec.rb ........../usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.1] Abort trap But I don't get the error if I turn off rcov's optimized C runtime $ rcov spec/**/*spec.rb --no-rcovrt .................................... Finished in 12.125441 seconds 36 specifications, 0 failures I've noticed that if there aren't too many specs then it runs just fine. Once we pass a certain number we get the error listed above. We're using: OS X 10.4.8 1.5 GHz Intel Core Solo 1Gb ram rcov 0.7.0 rcov rails plugin installed as an external svn repos (so it's on edge) rspec 0.7.4 rspec rails plugin for 0.7.4 rails 1.1.6 Ruby 1.8.4 ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 13:30 Message: Sounds like an RCov problem. Please take it up with the RCov author. ---------------------------------------------------------------------- Comment By: Clint Bishop (norobotdiving) Date: 2006-12-18 08:30 Message: We tried changing our rake task and still got the same error: /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:235: [BUG] Bus Error ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-12 14:46 Message: Try this instead: If I run the following task with Rake: desc "Run all specs with RCov" Spec::Rake::SpecTask.new('spec_rcov') do |t| t.spec_files = FileList['spec/**/*spec.rb'] t.rcov = true t.spec_opts = ["-fh"] t.out = "build/spec_results.html" end Also see http://rspec.rubyforge.org/rdoc/classes/Spec/Rake/SpecTask.html Does that work for you? If you still get a BUS error I'd take it up with Mauricio Fernandez (the rcov author) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7234&group_id=797 From noreply at rubyforge.org Mon Dec 18 13:33:32 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 13:33:32 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7344 ] Failing spec in HTML formatter Message-ID: <20061218183332.A8B855241442@rubyforge.org> Bugs item #7344, was opened at 2006-12-18 11:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7344&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bob Cotton (bcotton) Assigned to: Nobody (None) Summary: Failing spec in HTML formatter Initial Comment: This is revision 1322 ruby -v ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0] (build with all gcc optimizations off, ruby crashes on gem installs otherwise) 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED [...HTML DELETED...] Diff: @@ -119,9 +119,7 @@
Mock 'poke me' expected :poke with (any args) once, but received it 0 times
./failing_examples/mocking_example.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -135,9 +133,7 @@
(eval):3:in `three'
 ./failing_examples/mocking_example.rb:22:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -150,9 +146,7 @@
Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once
./failing_examples/mocking_example.rb:28:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -177,9 +171,7 @@
./failing_examples/diffing_spec.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -208,9 +200,7 @@
./failing_examples/diffing_spec.rb:34:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
/Users/bcotton/projects/rspec/lib/spec/expectations.rb:20:in `fail_with' /Users/bcotton/projects/rspec/lib/spec/expectations/should/base.rb:35:in `fail_with_message' /Users/bcotton/projects/rspec/lib/spec/expectations/should/should.rb:49:in `__delegate_method_missing_to_target' /Users/bcotton/projects/rspec/lib/spec/expectations/should/base.rb:15:in `==' ./spec/spec/runner/formatter/html_formatter_spec.rb:31: ./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir' ./spec/spec/runner/formatter/html_formatter_spec.rb:12: ./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each' ./spec/spec/runner/formatter/html_formatter_spec.rb:11: /Users/bcotton/projects/rspec/lib/spec/runner/specification.rb:55:in `instance_eval' /Users/bcotton/projects/rspec/lib/spec/runner/specification.rb:55:in `execute_spec' /Users/bcotton/projects/rspec/lib/spec/runner/specification.rb:30:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context.rb:57:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context.rb:54:in `each' /Users/bcotton/projects/rspec/lib/spec/runner/context.rb:54:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context_runner.rb:23:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context_runner.rb:22:in `each' /Users/bcotton/projects/rspec/lib/spec/runner/context_runner.rb:22:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/command_line.rb:26:in `run' /Users/bcotton/projects/rspec/bin/spec:4: /usr/local/lib/ruby/gems/1.8/gems/rcov-0.7.0.1/bin/rcov:493:in `load' /usr/local/lib/ruby/gems/1.8/gems/rcov-0.7.0.1/bin/rcov:493: /usr/local/bin/rcov:18:in `load' /usr/local/bin/rcov:18: Finished in 5.943487 seconds 497 specifications, 1 failure ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7344&group_id=797 From noreply at rubyforge.org Mon Dec 18 13:40:04 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 13:40:04 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7345 ] Adding context_setup and context_teardown, with specs and 100% rcov Message-ID: <20061218184004.AFB805241451@rubyforge.org> Patches item #7345, was opened at 2006-12-18 11:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bob Cotton (bcotton) Assigned to: Nobody (None) Summary: Adding context_setup and context_teardown, with specs and 100% rcov Initial Comment: Here is a patch for context_setup and context_teardown. The only spec I did not implement was: specify "should verify mocks created in context_setup after context_teardown" This would be very hard to plumb in. Let's assume for now that if you are using contxt_setup and context_teardown, you arent using mocks. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 From noreply at rubyforge.org Mon Dec 18 13:41:21 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 13:41:21 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-5663 ] context_setup Message-ID: <20061218184121.9C7AA5241451@rubyforge.org> Feature Requests item #5663, was opened at 2006-09-07 06:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5663&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: David Chelimsky (dchelimsky) Assigned to: Nobody (None) Summary: context_setup Initial Comment: There should be a context_setup (or similar construct) that only executes once within a given context. In fact, perhaps there could be such a thing with wider scope. The primary reason for this request has to do w/ using selenium. When you run the examples in ~/vendor/selenium, it fires up the browser once per spec. It would be nice to do that only once per run. ---------------------------------------------------------------------- Comment By: Bob Cotton (bcotton) Date: 2006-12-18 11:41 Message: Patch submitted in patch tracker: https://rubyforge.org/tracker/index.php?func=detail&aid=7345&group_id=797&atid=3151 ---------------------------------------------------------------------- Comment By: Bob Cotton (bcotton) Date: 2006-12-05 05:40 Message: This is a useful feature for defining acceptanct testing, where mocking is not an option. Additionally it would be great to allow instance variables from the context_setup to be visisble to all the specs. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-09-12 15:12 Message: Implementing this feature would potentially lead people to write specs that violate the principle of independent specs. Specs with sideffects. I've checked in a patchfile that deomstrates how to achieve a browser to be started only once. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5663&group_id=797 From noreply at rubyforge.org Mon Dec 18 13:46:42 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 13:46:42 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7344 ] Failing spec in HTML formatter Message-ID: <20061218184642.44B685241451@rubyforge.org> Bugs item #7344, was opened at 2006-12-18 13:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7344&group_id=797 Category: runner module Group: None Status: Open Resolution: None >Priority: 2 Submitted By: Bob Cotton (bcotton) Assigned to: Nobody (None) Summary: Failing spec in HTML formatter Initial Comment: This is revision 1322 ruby -v ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0] (build with all gcc optimizations off, ruby crashes on gem installs otherwise) 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED [...HTML DELETED...] Diff: @@ -119,9 +119,7 @@
Mock 'poke me' expected :poke with (any args) once, but received it 0 times
./failing_examples/mocking_example.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -135,9 +133,7 @@
(eval):3:in `three'
 ./failing_examples/mocking_example.rb:22:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -150,9 +146,7 @@
Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once
./failing_examples/mocking_example.rb:28:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -177,9 +171,7 @@
./failing_examples/diffing_spec.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
@@ -208,9 +200,7 @@
./failing_examples/diffing_spec.rb:34:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:16:
-./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:12:
-./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:11:
/Users/bcotton/projects/rspec/lib/spec/expectations.rb:20:in `fail_with' /Users/bcotton/projects/rspec/lib/spec/expectations/should/base.rb:35:in `fail_with_message' /Users/bcotton/projects/rspec/lib/spec/expectations/should/should.rb:49:in `__delegate_method_missing_to_target' /Users/bcotton/projects/rspec/lib/spec/expectations/should/base.rb:15:in `==' ./spec/spec/runner/formatter/html_formatter_spec.rb:31: ./spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir' ./spec/spec/runner/formatter/html_formatter_spec.rb:12: ./spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each' ./spec/spec/runner/formatter/html_formatter_spec.rb:11: /Users/bcotton/projects/rspec/lib/spec/runner/specification.rb:55:in `instance_eval' /Users/bcotton/projects/rspec/lib/spec/runner/specification.rb:55:in `execute_spec' /Users/bcotton/projects/rspec/lib/spec/runner/specification.rb:30:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context.rb:57:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context.rb:54:in `each' /Users/bcotton/projects/rspec/lib/spec/runner/context.rb:54:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context_runner.rb:23:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/context_runner.rb:22:in `each' /Users/bcotton/projects/rspec/lib/spec/runner/context_runner.rb:22:in `run' /Users/bcotton/projects/rspec/lib/spec/runner/command_line.rb:26:in `run' /Users/bcotton/projects/rspec/bin/spec:4: /usr/local/lib/ruby/gems/1.8/gems/rcov-0.7.0.1/bin/rcov:493:in `load' /usr/local/lib/ruby/gems/1.8/gems/rcov-0.7.0.1/bin/rcov:493: /usr/local/bin/rcov:18:in `load' /usr/local/bin/rcov:18: Finished in 5.943487 seconds 497 specifications, 1 failure ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 13:46 Message: I cannot reproduce this on Ruby 1.8.4. Looks like Ruby 1.8.5 (which I don't have yet) is adding more backtrace info. You can just ignore this. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7344&group_id=797 From noreply at rubyforge.org Mon Dec 18 14:00:32 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 14:00:32 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7345 ] Adding context_setup and context_teardown, with specs and 100% rcov Message-ID: <20061218190032.79C005241451@rubyforge.org> Patches item #7345, was opened at 2006-12-18 13:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 Category: runner module Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Bob Cotton (bcotton) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Adding context_setup and context_teardown, with specs and 100% rcov Initial Comment: Here is a patch for context_setup and context_teardown. The only spec I did not implement was: specify "should verify mocks created in context_setup after context_teardown" This would be very hard to plumb in. Let's assume for now that if you are using contxt_setup and context_teardown, you arent using mocks. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 14:00 Message: Sounds good about the mocks. I looked at the patch and the indentation seems a little off. Could you submit a new patch that follows the same indentation levels as the rest of the code, and use two spaces (not tabs) please? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 From noreply at rubyforge.org Mon Dec 18 14:28:20 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 14:28:20 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7345 ] Adding context_setup and context_teardown, with specs and 100% rcov Message-ID: <20061218192820.9678952411F4@rubyforge.org> Patches item #7345, was opened at 2006-12-18 11:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 Category: runner module Group: None Status: Open Resolution: Accepted Priority: 3 Submitted By: Bob Cotton (bcotton) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Adding context_setup and context_teardown, with specs and 100% rcov Initial Comment: Here is a patch for context_setup and context_teardown. The only spec I did not implement was: specify "should verify mocks created in context_setup after context_teardown" This would be very hard to plumb in. Let's assume for now that if you are using contxt_setup and context_teardown, you arent using mocks. ---------------------------------------------------------------------- >Comment By: Bob Cotton (bcotton) Date: 2006-12-18 12:28 Message: ok, here it is again, no tabs ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 12:00 Message: Sounds good about the mocks. I looked at the patch and the indentation seems a little off. Could you submit a new patch that follows the same indentation levels as the rest of the code, and use two spaces (not tabs) please? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 From noreply at rubyforge.org Mon Dec 18 15:30:38 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Dec 2006 15:30:38 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7345 ] Adding context_setup and context_teardown, with specs and 100% rcov Message-ID: <20061218203038.2157F52415B3@rubyforge.org> Patches item #7345, was opened at 2006-12-18 13:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 Category: runner module Group: None >Status: Closed Resolution: Accepted Priority: 3 Submitted By: Bob Cotton (bcotton) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Adding context_setup and context_teardown, with specs and 100% rcov Initial Comment: Here is a patch for context_setup and context_teardown. The only spec I did not implement was: specify "should verify mocks created in context_setup after context_teardown" This would be very hard to plumb in. Let's assume for now that if you are using contxt_setup and context_teardown, you arent using mocks. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 15:30 Message: Great patch. Applied in r1323. I added documentation too. ---------------------------------------------------------------------- Comment By: Bob Cotton (bcotton) Date: 2006-12-18 14:28 Message: ok, here it is again, no tabs ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 14:00 Message: Sounds good about the mocks. I looked at the patch and the indentation seems a little off. Could you submit a new patch that follows the same indentation levels as the rest of the code, and use two spaces (not tabs) please? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7345&group_id=797 From noreply at rubyforge.org Tue Dec 19 03:05:02 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 03:05:02 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7353 ] has_many :through bug? Message-ID: <20061219080502.DB3645241D9C@rubyforge.org> Bugs item #7353, was opened at 2006-12-19 08:05 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: has_many :through bug? Initial Comment: class Project < ActiveRecord::Base has_many :project_users has_many :users, :through=>:project_users end class User < ActiveRecord::Base has_many :project_users has_many :projects, :through=> :project_users end class ProjectUser < ActiveRecord::Base belongs_to :project belongs_to :users end ##spec## context "The Project Model" do fixtures :projects, :users, :project_users specify "should associate to a user" do project = Project.find(1) #passes project.should_have(2).users #passes project.users.should_include users(:admin) #fails end end ##errors## 1) 'The Project Model should associate to a user' FAILED [#"1", "id"=>"1", "user_id"=>"1"}>, #"1", "id"=>"2", "user_id"=>"2"}>] should include #"daed2d80790f1a28cb24d0dbcf9b61ae6b83490a", "updated_at"=>nil, "crypted_password"=>"27038ea45242931b85f8ef1bf115118ccbb2d301", "is_developer"=>"0", "is_client"=>"0", "is_admin" =>"1", "remember_token_expires_at"=>nil, "id"=>"1", "remember_token"=>nil, "login"=>"admin_test", "created_at"=>nil, "email"=>"admin_test at gmail.com"}> ./spec/models/project_spec.rb:20: it appears that when product.users is referenced that rspec is looking at product.product_users and not at the actual Users table. Investigating this via console reveals that product.users returns an array of users.... what gives? It would be great if I could get an email about this. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 From noreply at rubyforge.org Tue Dec 19 03:07:07 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 03:07:07 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7353 ] has_many :through bug? Message-ID: <20061219080707.DEB2C5241D9A@rubyforge.org> Bugs item #7353, was opened at 2006-12-19 08:05 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: has_many :through bug? Initial Comment: class Project < ActiveRecord::Base has_many :project_users has_many :users, :through=>:project_users end class User < ActiveRecord::Base has_many :project_users has_many :projects, :through=> :project_users end class ProjectUser < ActiveRecord::Base belongs_to :project belongs_to :users end ##spec## context "The Project Model" do fixtures :projects, :users, :project_users specify "should associate to a user" do project = Project.find(1) #passes project.should_have(2).users #passes project.users.should_include users(:admin) #fails end end ##errors## 1) 'The Project Model should associate to a user' FAILED [#"1", "id"=>"1", "user_id"=>"1"}>, #"1", "id"=>"2", "user_id"=>"2"}>] should include #"daed2d80790f1a28cb24d0dbcf9b61ae6b83490a", "updated_at"=>nil, "crypted_password"=>"27038ea45242931b85f8ef1bf115118ccbb2d301", "is_developer"=>"0", "is_client"=>"0", "is_admin" =>"1", "remember_token_expires_at"=>nil, "id"=>"1", "remember_token"=>nil, "login"=>"admin_test", "created_at"=>nil, "email"=>"admin_test at gmail.com"}> ./spec/models/project_spec.rb:20: it appears that when product.users is referenced that rspec is looking at product.product_users and not at the actual Users table. Investigating this via console reveals that product.users returns an array of users.... what gives? It would be great if I could get an email about this. ---------------------------------------------------------------------- >Comment By: Dallas Pool (codeninja) Date: 2006-12-19 08:07 Message: not a bug, project_users.rb has a typo. should be belongs_to :user my bad. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 From noreply at rubyforge.org Tue Dec 19 03:23:25 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 03:23:25 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7353 ] has_many :through bug? Message-ID: <20061219082326.0FF3F5241D9C@rubyforge.org> Bugs item #7353, was opened at 2006-12-19 08:05 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: has_many :through bug? Initial Comment: class Project < ActiveRecord::Base has_many :project_users has_many :users, :through=>:project_users end class User < ActiveRecord::Base has_many :project_users has_many :projects, :through=> :project_users end class ProjectUser < ActiveRecord::Base belongs_to :project belongs_to :users end ##spec## context "The Project Model" do fixtures :projects, :users, :project_users specify "should associate to a user" do project = Project.find(1) #passes project.should_have(2).users #passes project.users.should_include users(:admin) #fails end end ##errors## 1) 'The Project Model should associate to a user' FAILED [#"1", "id"=>"1", "user_id"=>"1"}>, #"1", "id"=>"2", "user_id"=>"2"}>] should include #"daed2d80790f1a28cb24d0dbcf9b61ae6b83490a", "updated_at"=>nil, "crypted_password"=>"27038ea45242931b85f8ef1bf115118ccbb2d301", "is_developer"=>"0", "is_client"=>"0", "is_admin" =>"1", "remember_token_expires_at"=>nil, "id"=>"1", "remember_token"=>nil, "login"=>"admin_test", "created_at"=>nil, "email"=>"admin_test at gmail.com"}> ./spec/models/project_spec.rb:20: it appears that when product.users is referenced that rspec is looking at product.product_users and not at the actual Users table. Investigating this via console reveals that product.users returns an array of users.... what gives? It would be great if I could get an email about this. ---------------------------------------------------------------------- >Comment By: Dallas Pool (codeninja) Date: 2006-12-19 08:23 Message: problem was with the a foreign_key_associations plugin which is unneeded. definitely not a bug. ---------------------------------------------------------------------- Comment By: Dallas Pool (codeninja) Date: 2006-12-19 08:07 Message: not a bug, project_users.rb has a typo. should be belongs_to :user my bad. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 From noreply at rubyforge.org Tue Dec 19 04:06:20 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 04:06:20 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7353 ] has_many :through bug? Message-ID: <20061219090620.CF3E95241DA8@rubyforge.org> Bugs item #7353, was opened at 2006-12-19 08:05 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: has_many :through bug? Initial Comment: class Project < ActiveRecord::Base has_many :project_users has_many :users, :through=>:project_users end class User < ActiveRecord::Base has_many :project_users has_many :projects, :through=> :project_users end class ProjectUser < ActiveRecord::Base belongs_to :project belongs_to :users end ##spec## context "The Project Model" do fixtures :projects, :users, :project_users specify "should associate to a user" do project = Project.find(1) #passes project.should_have(2).users #passes project.users.should_include users(:admin) #fails end end ##errors## 1) 'The Project Model should associate to a user' FAILED [#"1", "id"=>"1", "user_id"=>"1"}>, #"1", "id"=>"2", "user_id"=>"2"}>] should include #"daed2d80790f1a28cb24d0dbcf9b61ae6b83490a", "updated_at"=>nil, "crypted_password"=>"27038ea45242931b85f8ef1bf115118ccbb2d301", "is_developer"=>"0", "is_client"=>"0", "is_admin" =>"1", "remember_token_expires_at"=>nil, "id"=>"1", "remember_token"=>nil, "login"=>"admin_test", "created_at"=>nil, "email"=>"admin_test at gmail.com"}> ./spec/models/project_spec.rb:20: it appears that when product.users is referenced that rspec is looking at product.product_users and not at the actual Users table. Investigating this via console reveals that product.users returns an array of users.... what gives? It would be great if I could get an email about this. ---------------------------------------------------------------------- Comment By: Dallas Pool (codeninja) Date: 2006-12-19 08:23 Message: problem was with the a foreign_key_associations plugin which is unneeded. definitely not a bug. ---------------------------------------------------------------------- Comment By: Dallas Pool (codeninja) Date: 2006-12-19 08:07 Message: not a bug, project_users.rb has a typo. should be belongs_to :user my bad. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7353&group_id=797 From noreply at rubyforge.org Tue Dec 19 18:38:12 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 18:38:12 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061219233812.1FBF5524141F@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None >Status: Open Resolution: Rejected Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: Michael Johnston (lastobelus) Date: 2006-12-19 23:38 Message: Hi David, Any feedback on this? If I'm doing something stupid I would really appreciate finding out what it is. As it stands, the should_render_rjs seems simply not to work. I tried it with non-edge rails and got the same result. BTW, I did notice I put the wrong div name in the second spec (changed now in the linked archive) HOWEVER this has no effect on the result as the error is unrelated to that. Can we re-open the bug? Maybe somebody else has an answer. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 17:11 Message: I created a brand new edge rails app, using the following procedure: 281 rails rjstest 282 cd rjstest/ 283 rake rails:freeze:edge 284 script/plugin install svn://rubyforge.org/var/svn/rspec/tags/ REL_0_7_4/vendor/rspec_on_rails/vendor/plugins/rspec 289 ruby script/generate rspec_controller bob 290 mate . 292 ruby script/generate rspec 295 spec spec/controllers/bob_controller_spec.rb Both problems are demonstrated. Here is a link to an archive of it: http://www.lastmetal.com/misc/rjstest.tgz ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:24 Message: Would you mind posting your the spec and controller code? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 16:18 Message: Ok, I certainly tried it that way. However in my setup ALL the should_render_rjs forms report: 1) NoMethodError in 'The HomeController should replace bob with 'sometext' on AJAX request to stuff' nil does not respond to `rjs' or `has_rjs?' when the should_render_rjs is called before the GET. I posted about this a few days ago on the mailing list, but haven't found an answer as to why. I am using edge rails, and to my knowledge there is nothing extra or unusual in my setup And, I discovered, the other forms of should_render_rjs do work correctly with the call after the request. I believe the two issues are orthogonal. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Tue Dec 19 20:07:23 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 20:07:23 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061220010723.E4AA55241378@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None Status: Open Resolution: Rejected Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-20 01:07 Message: You're fine - we didn't have any specs using :page and :replace_..... Working on it now. Sadly, just released 0.7.5, so it'll be a bit before the fix is released, but you can grab the trunk as soon as we get the fix in. David ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-19 23:38 Message: Hi David, Any feedback on this? If I'm doing something stupid I would really appreciate finding out what it is. As it stands, the should_render_rjs seems simply not to work. I tried it with non-edge rails and got the same result. BTW, I did notice I put the wrong div name in the second spec (changed now in the linked archive) HOWEVER this has no effect on the result as the error is unrelated to that. Can we re-open the bug? Maybe somebody else has an answer. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 17:11 Message: I created a brand new edge rails app, using the following procedure: 281 rails rjstest 282 cd rjstest/ 283 rake rails:freeze:edge 284 script/plugin install svn://rubyforge.org/var/svn/rspec/tags/ REL_0_7_4/vendor/rspec_on_rails/vendor/plugins/rspec 289 ruby script/generate rspec_controller bob 290 mate . 292 ruby script/generate rspec 295 spec spec/controllers/bob_controller_spec.rb Both problems are demonstrated. Here is a link to an archive of it: http://www.lastmetal.com/misc/rjstest.tgz ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:24 Message: Would you mind posting your the spec and controller code? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 16:18 Message: Ok, I certainly tried it that way. However in my setup ALL the should_render_rjs forms report: 1) NoMethodError in 'The HomeController should replace bob with 'sometext' on AJAX request to stuff' nil does not respond to `rjs' or `has_rjs?' when the should_render_rjs is called before the GET. I posted about this a few days ago on the mailing list, but haven't found an answer as to why. I am using edge rails, and to my knowledge there is nothing extra or unusual in my setup And, I discovered, the other forms of should_render_rjs do work correctly with the call after the request. I believe the two issues are orthogonal. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Tue Dec 19 20:30:25 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 19 Dec 2006 20:30:25 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7039 ] should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Message-ID: <20061220013025.94CA152415CB@rubyforge.org> Bugs item #7039, was opened at 2006-12-04 13:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 Category: rails plugin Group: None Status: Open >Resolution: Postponed Priority: 3 Submitted By: Michael Johnston (lastobelus) Assigned to: Nobody (None) Summary: should_render_rjs :page, 'e', :replace_html, /t/ FAILS (tries to match incorrectly) Initial Comment: given the following action: def stuff render :update { |page| page[:bob].replace_html "sometext" } end the following spec: specify "should replace bob with 'sometext' on AJAX request to stuff" do get 'stuff' controller.should_render_rjs :page, 'bob', :replace_html, /some/ end Fails with the following report: should replace bob with bob's string on AJAX request to stuff "$(\bob\).update(\wtf!!!!!\);" should match /\$\("bob"\)\.update\(""\)\.\(\?\-mix:some\)\(\);/ /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:26:in `should_page' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `send' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/rjs_expectations.rb:8:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/extensions/action_controller/test_response.rb:6:in `should_have_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/render_matcher.rb:58:in `should_render_rjs' /Users/lasto/clients/ibc/project_n/vendor/plugins/rspec/lib/spec/rails/context/controller.rb:66:in `should_render_rjs' ./spec/controllers/ad_controller_spec.rb:84: IE, the regex is simply being appended to the update call instead of matching inside the parameter to the update call. I had a go at figuring it out, but it was beyond my ability to understand in the amount of time I had to spend on it. I think some extra parsing has to be done after the call to JavascriptGenerator? I don't know whether JavascriptGenerator is supposed to be able to stick a regex.to_s inside the update() call and the signature of the call to it is wrong, or if an empty "update" template needs to be retrieved from JavascriptGenerator and the regex inserted into it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-20 01:30 Message: Actually, it looks like ARTS, from which should_have_rjs was ported, doesn't even support this. It only supports the following forms of page['id']: page['some_id'].toggle page['some_id'].style.color = 'red' I'm working on an assert_select wrapper for rspec right now. If this ends up supporting spec'ing the forms you're looking for we probably won't go any farther on should_have_rjs. I'll follow up as things evolve. In the mean time, if you use this form in your app: page.replace 'mydiv', 'replacement text' you can spec it. David ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-20 01:07 Message: You're fine - we didn't have any specs using :page and :replace_..... Working on it now. Sadly, just released 0.7.5, so it'll be a bit before the fix is released, but you can grab the trunk as soon as we get the fix in. David ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-19 23:38 Message: Hi David, Any feedback on this? If I'm doing something stupid I would really appreciate finding out what it is. As it stands, the should_render_rjs seems simply not to work. I tried it with non-edge rails and got the same result. BTW, I did notice I put the wrong div name in the second spec (changed now in the linked archive) HOWEVER this has no effect on the result as the error is unrelated to that. Can we re-open the bug? Maybe somebody else has an answer. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 17:11 Message: I created a brand new edge rails app, using the following procedure: 281 rails rjstest 282 cd rjstest/ 283 rake rails:freeze:edge 284 script/plugin install svn://rubyforge.org/var/svn/rspec/tags/ REL_0_7_4/vendor/rspec_on_rails/vendor/plugins/rspec 289 ruby script/generate rspec_controller bob 290 mate . 292 ruby script/generate rspec 295 spec spec/controllers/bob_controller_spec.rb Both problems are demonstrated. Here is a link to an archive of it: http://www.lastmetal.com/misc/rjstest.tgz ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:24 Message: Would you mind posting your the spec and controller code? ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-05 16:18 Message: Ok, I certainly tried it that way. However in my setup ALL the should_render_rjs forms report: 1) NoMethodError in 'The HomeController should replace bob with 'sometext' on AJAX request to stuff' nil does not respond to `rjs' or `has_rjs?' when the should_render_rjs is called before the GET. I posted about this a few days ago on the mailing list, but haven't found an answer as to why. I am using edge rails, and to my knowledge there is nothing extra or unusual in my setup And, I discovered, the other forms of should_render_rjs do work correctly with the call after the request. I believe the two issues are orthogonal. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-05 16:01 Message: http://rspec.rubyforge.org/documentation/rails/writing/controllers.html You have to put the controller.should_render_rjs call BEFORE the get: specify "should replace bob with 'sometext' on AJAX request to stuff" do controller.should_render_rjs :page, 'bob', :replace_html, /some/ get 'stuff' end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7039&group_id=797 From noreply at rubyforge.org Wed Dec 20 07:32:15 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 07:32:15 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7387 ] Allow stubs to return consecutive values Message-ID: <20061220123215.E10B95241797@rubyforge.org> Patches item #7387, was opened at 2006-12-20 05:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: Allow stubs to return consecutive values Initial Comment: I've got a method in one of my models that looks like: def current_book if b = books.find_by_reading(true) b else b = books.find_by_reading false b.update_attribute :reading, true end b end My spec is context "A User with one book" do setup do @user = User.new @book = Book.new :title => "Ruby for Rails" @user.add_book @book @user.books.stub!(:find_by_reading).and_return(nil, @book) end specify "should treat it as the current book" do @user.current_book.should_be @book end specify "should update the current book as reading" do @book.should_receive(:update_attribute).with(:reading, true) @user.current_book end end Now I know that in my code I don't really need the second find_by_reading(false), because any book found will have reading set to false, but it provides me with a database-independent way to find a pseudo-random book. To do this, I need the first call to find_by_reading to return nil so that it just finds a random book and updates it. The included patch allows ou to specify consecutive return values in stubs. The last value returned will continue to be returned on consecutive calls. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 From noreply at rubyforge.org Wed Dec 20 10:32:15 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 10:32:15 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7387 ] Allow stubs to return consecutive values Message-ID: <20061220153215.BEFBE524180F@rubyforge.org> Patches item #7387, was opened at 2006-12-20 12:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 >Category: mock module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) >Assigned to: David Chelimsky (dchelimsky) Summary: Allow stubs to return consecutive values Initial Comment: I've got a method in one of my models that looks like: def current_book if b = books.find_by_reading(true) b else b = books.find_by_reading false b.update_attribute :reading, true end b end My spec is context "A User with one book" do setup do @user = User.new @book = Book.new :title => "Ruby for Rails" @user.add_book @book @user.books.stub!(:find_by_reading).and_return(nil, @book) end specify "should treat it as the current book" do @user.current_book.should_be @book end specify "should update the current book as reading" do @book.should_receive(:update_attribute).with(:reading, true) @user.current_book end end Now I know that in my code I don't really need the second find_by_reading(false), because any book found will have reading set to false, but it provides me with a database-independent way to find a pseudo-random book. To do this, I need the first call to find_by_reading to return nil so that it just finds a random book and updates it. The included patch allows ou to specify consecutive return values in stubs. The last value returned will continue to be returned on consecutive calls. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-20 15:32 Message: Good patch. Thanks. I've got it all patched and doc'd locally, but I'm having trouble w/ ssh from my current location. Will commit tonight. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 From dchelimsky at gmail.com Wed Dec 20 13:04:55 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 20 Dec 2006 12:04:55 -0600 Subject: [rspec-devel] [ANN] RSpec 0.7.5 Message-ID: <57c63afe0612201004q1a5085cn228b1268487c2d84@mail.gmail.com> The RSpec Development Team is pleased to announce the release of RSpec 0.7.5. This release adds support for Heckle - Seattle'rb's code mutation tool. There are also several bug fixes to the RSpec core and the RSpec on Rails plugin. Changes: http://rspec.rubyforge.org/changes.html Download: http://rubyforge.org/frs/?group_id=797 or gem install rspec Happy spec'ing, and now heckling! The RSpec Development Team From noreply at rubyforge.org Wed Dec 20 13:29:10 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 13:29:10 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7393 ] Fix for rake task Message-ID: <20061220182910.C79615241859@rubyforge.org> Bugs item #7393, was opened at 2006-12-20 11:29 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7393&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: Fix for rake task Initial Comment: I've spent a lot of time tracking this down, and it has to do with Rails changed their autoloading of plugin paths. You can read a discussion at http://groups.google.com/group/rubyonrails-core/browse_thread/thread/f6a655492e571aa2/2ab16acc2fee611a#2ab16acc2fee611a The rake tasks are broken because they reference 'spec/rake/spectask' but rspec/lib is not in the path yet. This patch changes the rakefile to look for the rspec plugin, use it if it's there, and use the gem version if it's not. I tried using $:unshift to put rspec/lib in the path, but for whatever reason calling require would still get the gem version. So the patch is kind of ugly in that it does an if/else, but it works just fine. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7393&group_id=797 From noreply at rubyforge.org Wed Dec 20 14:17:55 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 14:17:55 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7393 ] Fix for rake task Message-ID: <20061220191755.88D9B52417B1@rubyforge.org> Patches item #7393, was opened at 2006-12-20 18:29 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7393&group_id=797 >Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: Fix for rake task Initial Comment: I've spent a lot of time tracking this down, and it has to do with Rails changed their autoloading of plugin paths. You can read a discussion at http://groups.google.com/group/rubyonrails-core/browse_thread/thread/f6a655492e571aa2/2ab16acc2fee611a#2ab16acc2fee611a The rake tasks are broken because they reference 'spec/rake/spectask' but rspec/lib is not in the path yet. This patch changes the rakefile to look for the rspec plugin, use it if it's there, and use the gem version if it's not. I tried using $:unshift to put rspec/lib in the path, but for whatever reason calling require would still get the gem version. So the patch is kind of ugly in that it does an if/else, but it works just fine. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7393&group_id=797 From noreply at rubyforge.org Wed Dec 20 14:18:17 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 14:18:17 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7393 ] Fix for rake task Message-ID: <20061220191817.84BA352417E5@rubyforge.org> Patches item #7393, was opened at 2006-12-20 18:29 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7393&group_id=797 >Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) >Assigned to: David Chelimsky (dchelimsky) Summary: Fix for rake task Initial Comment: I've spent a lot of time tracking this down, and it has to do with Rails changed their autoloading of plugin paths. You can read a discussion at http://groups.google.com/group/rubyonrails-core/browse_thread/thread/f6a655492e571aa2/2ab16acc2fee611a#2ab16acc2fee611a The rake tasks are broken because they reference 'spec/rake/spectask' but rspec/lib is not in the path yet. This patch changes the rakefile to look for the rspec plugin, use it if it's there, and use the gem version if it's not. I tried using $:unshift to put rspec/lib in the path, but for whatever reason calling require would still get the gem version. So the patch is kind of ugly in that it does an if/else, but it works just fine. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7393&group_id=797 From noreply at rubyforge.org Wed Dec 20 19:49:53 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 19:49:53 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-4462 ] Ability to use RSpec without the runner Message-ID: <20061221004953.D07035241913@rubyforge.org> Feature Requests item #4462, was opened at 2006-05-13 04:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Ability to use RSpec without the runner Initial Comment: Hello, I was previously using the Ruby test/unit framework with a Ruby interpreter embedded inside a C program. In such a situation, I am unable to use an external runner program to bootstrap the Ruby interpreter, and I need the ability to work the other way around: bootstrap RSpec from within Ruby. This problem was discussed and solved (see attached file) at [ruby-talk: 192569]. Thanks for your attention. ---------------------------------------------------------------------- >Comment By: Suraj Kurapati (snk) Date: 2006-12-21 00:49 Message: The reason I am making this request is because I am having to maintain rSpec-internals-specific code along with my hardware verification project (ruby-vpi). If I could get you guys to incorporate this code, then I don't have to keep watching if rSpec internal API changes and breaks my code. Also, it would be easier for you guys to maintain it because it uses your internal code base --- which you have most knowledge about. Seems like a reasonable request to me. :-/ ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-05 07:18 Message: Please see the new file (updated for rSpec 0.7.2). > Do you want us to add this file to RSpec's svn? Where? Yes. Please add it to SVN as (my suggestion): lib/rspec/runner.rb If you do that, then people can use rSpec from within Ruby by writing: require 'rubygems' require 'rspec' require 'rspec/runner' context "..." do specify "..." do # ... end end ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-05-20 01:40 Message: > Do you want us to add this file to RSpec's svn? Where? Perhaps not this exact file (I'm not sure it meets your coding standards), but something similar. > How does it compare to spec.rb? spec.rb doesn't allow simply 'require'ing or 'load'ing it to use RSpec: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'rspec' => true irb(main):003:0> require 'spec' => false irb(main):004:0> load 'spec' Usage: spec [options] (FILE|DIRECTORY)+ -b, --backtrace Output full backtrace -f, --format FORMAT Output format (specdoc|s|rdoc|r) -d, --dry-run Don't execute specs -s, --spec SPECIFICATION_NAME Execute a single specification -v, --version Show version -h, --help Show this message I am looking for functionality like test/unit, where simply 'require'ing that library will bootstrap it upon exit: irb(main):001:0> require 'test/unit' => true irb(main):002:0> quit Loaded suite irb Started Finished in 0.000675 seconds. 0 tests, 0 assertions, 0 failures, 0 errors /usr/lib/ruby/1.8/irb.rb:76:in `throw': uncaught throw `IRB_EXIT' (NameError) from /usr/lib/ruby/1.8/irb.rb:76:in `irb_exit' from /usr/lib/ruby/1.8/irb/context.rb:226:in `exit' from /usr/lib/ruby/1.8/irb/extend-command.rb:24:in `exit' from /usr/lib/ruby/1.8/test/unit.rb:285 from /usr/bin/irb:13 > Can you give some more examples about how and when it's used? Please see the attached file. It is executed by a Ruby interpreter embedded inside a C program (a Verilog simulator in this case). It is essential to have the ability to bootstrap the RSpec library from within the attached file (like test/unit bootstaps itself just by being 'require'd). Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-05-18 18:50 Message: Do you want us to add this file to RSpec's svn? Where? How does it compare to spec.rb? Can you give some more examples about how and when it's used? For future reference - the ruby-talk link is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 From noreply at rubyforge.org Wed Dec 20 19:52:16 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 19:52:16 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-4462 ] Ability to use RSpec without the runner Message-ID: <20061221005217.4CE1F5241913@rubyforge.org> Feature Requests item #4462, was opened at 2006-05-13 04:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Ability to use RSpec without the runner Initial Comment: Hello, I was previously using the Ruby test/unit framework with a Ruby interpreter embedded inside a C program. In such a situation, I am unable to use an external runner program to bootstrap the Ruby interpreter, and I need the ability to work the other way around: bootstrap RSpec from within Ruby. This problem was discussed and solved (see attached file) at [ruby-talk: 192569]. Thanks for your attention. ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-21 00:49 Message: The reason I am making this request is because I am having to maintain rSpec-internals-specific code along with my hardware verification project (ruby-vpi). If I could get you guys to incorporate this code, then I don't have to keep watching if rSpec internal API changes and breaks my code. Also, it would be easier for you guys to maintain it because it uses your internal code base --- which you have most knowledge about. Seems like a reasonable request to me. :-/ ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-05 07:18 Message: Please see the new file (updated for rSpec 0.7.2). > Do you want us to add this file to RSpec's svn? Where? Yes. Please add it to SVN as (my suggestion): lib/rspec/runner.rb If you do that, then people can use rSpec from within Ruby by writing: require 'rubygems' require 'rspec' require 'rspec/runner' context "..." do specify "..." do # ... end end ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-05-20 01:40 Message: > Do you want us to add this file to RSpec's svn? Where? Perhaps not this exact file (I'm not sure it meets your coding standards), but something similar. > How does it compare to spec.rb? spec.rb doesn't allow simply 'require'ing or 'load'ing it to use RSpec: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'rspec' => true irb(main):003:0> require 'spec' => false irb(main):004:0> load 'spec' Usage: spec [options] (FILE|DIRECTORY)+ -b, --backtrace Output full backtrace -f, --format FORMAT Output format (specdoc|s|rdoc|r) -d, --dry-run Don't execute specs -s, --spec SPECIFICATION_NAME Execute a single specification -v, --version Show version -h, --help Show this message I am looking for functionality like test/unit, where simply 'require'ing that library will bootstrap it upon exit: irb(main):001:0> require 'test/unit' => true irb(main):002:0> quit Loaded suite irb Started Finished in 0.000675 seconds. 0 tests, 0 assertions, 0 failures, 0 errors /usr/lib/ruby/1.8/irb.rb:76:in `throw': uncaught throw `IRB_EXIT' (NameError) from /usr/lib/ruby/1.8/irb.rb:76:in `irb_exit' from /usr/lib/ruby/1.8/irb/context.rb:226:in `exit' from /usr/lib/ruby/1.8/irb/extend-command.rb:24:in `exit' from /usr/lib/ruby/1.8/test/unit.rb:285 from /usr/bin/irb:13 > Can you give some more examples about how and when it's used? Please see the attached file. It is executed by a Ruby interpreter embedded inside a C program (a Verilog simulator in this case). It is essential to have the ability to bootstrap the RSpec library from within the attached file (like test/unit bootstaps itself just by being 'require'd). Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-05-18 18:50 Message: Do you want us to add this file to RSpec's svn? Where? How does it compare to spec.rb? Can you give some more examples about how and when it's used? For future reference - the ruby-talk link is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 From noreply at rubyforge.org Wed Dec 20 19:55:46 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 19:55:46 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7101 ] warning: useless use of == in void context Message-ID: <20061221005547.2AF2A5241A36@rubyforge.org> Bugs item #7101, was opened at 2006-12-05 06:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: warning: useless use of == in void context Initial Comment: The new "should ==" syntax of rSpec (versions > 0.7.0) is causing these warnings: warning: useless use of == in void context In particular, each line of the following code causes the above warning: L0d_cache.l0d_p_rd_nack.intVal.should == 1 L0d_cache.l0d_l1_req.intVal.should == 1 Finally, I am seeing these warnings because I always run ruby with the '-w' option: 'ruby -w' Thanks for your consideration. ---------------------------------------------------------------------- >Comment By: Suraj Kurapati (snk) Date: 2006-12-21 00:55 Message: Alright, I'm running my specs without -w for now. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-05 07:54 Message: I don't think there is anything we can do about that - except for running without the -w flag. What do you think? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 From christoph.sturm at gmail.com Wed Dec 20 20:44:17 2006 From: christoph.sturm at gmail.com (Christoph Sturm) Date: Thu, 21 Dec 2006 02:44:17 +0100 Subject: [rspec-devel] typo on rspec website Message-ID: <11dae57c0612201744v7bf1c368r2ef4e56852eb7635@mail.gmail.com> hey guys! on this page: http://rspec.rubyforge.org/documentation/rails/install.html all the svn urls are wrong which makes it quite hard to install the plugin. for example: ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/rspec_on_rails/vendor/plugin/rspec_on_rails should really be ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/rspec_on_rails/vendor/plugins/rspec_on_rails (always plugins instead of plugin) regards chris From noreply at rubyforge.org Wed Dec 20 21:45:19 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 21:45:19 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7387 ] Allow stubs to return consecutive values Message-ID: <20061221024519.7D5545241A5E@rubyforge.org> Patches item #7387, was opened at 2006-12-20 12:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 Category: mock module Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: David Chelimsky (dchelimsky) Summary: Allow stubs to return consecutive values Initial Comment: I've got a method in one of my models that looks like: def current_book if b = books.find_by_reading(true) b else b = books.find_by_reading false b.update_attribute :reading, true end b end My spec is context "A User with one book" do setup do @user = User.new @book = Book.new :title => "Ruby for Rails" @user.add_book @book @user.books.stub!(:find_by_reading).and_return(nil, @book) end specify "should treat it as the current book" do @user.current_book.should_be @book end specify "should update the current book as reading" do @book.should_receive(:update_attribute).with(:reading, true) @user.current_book end end Now I know that in my code I don't really need the second find_by_reading(false), because any book found will have reading set to false, but it provides me with a database-independent way to find a pseudo-random book. To do this, I need the first call to find_by_reading to return nil so that it just finds a random book and updates it. The included patch allows ou to specify consecutive return values in stubs. The last value returned will continue to be returned on consecutive calls. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 02:45 Message: Applied to trunk (rev 1333). ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-20 15:32 Message: Good patch. Thanks. I've got it all patched and doc'd locally, but I'm having trouble w/ ssh from my current location. Will commit tonight. Cheers, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 From noreply at rubyforge.org Wed Dec 20 21:45:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 21:45:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7393 ] Fix for rake task Message-ID: <20061221024558.D2EA25241A5E@rubyforge.org> Patches item #7393, was opened at 2006-12-20 18:29 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7393&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: David Chelimsky (dchelimsky) Summary: Fix for rake task Initial Comment: I've spent a lot of time tracking this down, and it has to do with Rails changed their autoloading of plugin paths. You can read a discussion at http://groups.google.com/group/rubyonrails-core/browse_thread/thread/f6a655492e571aa2/2ab16acc2fee611a#2ab16acc2fee611a The rake tasks are broken because they reference 'spec/rake/spectask' but rspec/lib is not in the path yet. This patch changes the rakefile to look for the rspec plugin, use it if it's there, and use the gem version if it's not. I tried using $:unshift to put rspec/lib in the path, but for whatever reason calling require would still get the gem version. So the patch is kind of ugly in that it does an if/else, but it works just fine. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 02:45 Message: Applied in trunk (rev 1333). ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7393&group_id=797 From dchelimsky at gmail.com Wed Dec 20 22:07:15 2006 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 20 Dec 2006 21:07:15 -0600 Subject: [rspec-devel] typo on rspec website In-Reply-To: <11dae57c0612201744v7bf1c368r2ef4e56852eb7635@mail.gmail.com> References: <11dae57c0612201744v7bf1c368r2ef4e56852eb7635@mail.gmail.com> Message-ID: <57c63afe0612201907s55856fw91af5859352a58b7@mail.gmail.com> On 12/20/06, Christoph Sturm wrote: > hey guys! > > on this page: > http://rspec.rubyforge.org/documentation/rails/install.html > > all the svn urls are wrong which makes it quite hard to install the plugin. > > for example: > ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/rspec_on_rails/vendor/plugin/rspec_on_rails > > should really be > ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/rspec_on_rails/vendor/plugins/rspec_on_rails > > (always plugins instead of plugin) Fixed. Thanks. > > regards > chris > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Wed Dec 20 22:15:18 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 22:15:18 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7402 ] Documentation Bug: Installation Instructions Message-ID: <20061221031518.6C59E5241A66@rubyforge.org> Bugs item #7402, was opened at 2006-12-20 22:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7402&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jonathan Simms (slyphon) Assigned to: Nobody (None) Summary: Documentation Bug: Installation Instructions Initial Comment: Hey, just a little detail on the page: http://rspec.rubyforge.org/documentation/rails/install.html "RSpec on Rails is a regular Rails plugin. It can be installed via your Rails app?s script/plugin tool. In the examples below ? make sure you replace X_Y_Z with the version of the plugin you want to install. It?s important that the REL_X_Y_Z corresponds to the version of RSpec core you have installed ? for example REL_0_7_0." First, the command line given is incorrect: "ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/rspec_on_rails/vendor/plugin/rspec_on_rails" the path should be (in part) "vendor/plugins" (plural) Next, and this is merely a suggestion, I installed RSpec 0.7.4 (at first), and when I tried the above method to install the rails plugin: slyphon at ubangy rspec-try $ ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/rspec_on_rails/vendor/plugins/rspec_on_rails Export complete. yet my vendor/plugins directory was empty. I then tried an 'svn ls' slyphon at ubangy rspec-try $ svn ls svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/rspec_on_rails/ svn: URL 'svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/rspec_on_rails' non-existent in that revision It appears that as of REL_0_7_5, the above instructions will work, but they will fail for users with earlier releases. It'd probably be useful for newbies if you mention this. Anyhoo, I look forward to trying out RSpec with great anticipation! -Jonathan Simms ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7402&group_id=797 From noreply at rubyforge.org Wed Dec 20 22:31:57 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 22:31:57 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-4462 ] Ability to use RSpec without the runner Message-ID: <20061221033157.DC80E5241A6A@rubyforge.org> Feature Requests item #4462, was opened at 2006-05-13 04:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Ability to use RSpec without the runner Initial Comment: Hello, I was previously using the Ruby test/unit framework with a Ruby interpreter embedded inside a C program. In such a situation, I am unable to use an external runner program to bootstrap the Ruby interpreter, and I need the ability to work the other way around: bootstrap RSpec from within Ruby. This problem was discussed and solved (see attached file) at [ruby-talk: 192569]. Thanks for your attention. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 03:31 Message: I looked at the ruby talk thread: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 The difference in behaviour between running the spec command and running specs via ruby is a bug that was fixed a while ago. Right now if you stand in the project root and say: bin/spec examples/stack_spec.rb -fs you'll get the same output as ruby examples/stack_spec.rb -fs I'm not sure if that solves your problem or not. Please let us know if this is really still a problem. Even if it is, adding the file to RSpec doesn't really make any sense to me without a spec that will prove that changes we make to the file will not break your environment (as it currently exists). Can you provide such? ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-21 00:49 Message: The reason I am making this request is because I am having to maintain rSpec-internals-specific code along with my hardware verification project (ruby-vpi). If I could get you guys to incorporate this code, then I don't have to keep watching if rSpec internal API changes and breaks my code. Also, it would be easier for you guys to maintain it because it uses your internal code base --- which you have most knowledge about. Seems like a reasonable request to me. :-/ ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-05 07:18 Message: Please see the new file (updated for rSpec 0.7.2). > Do you want us to add this file to RSpec's svn? Where? Yes. Please add it to SVN as (my suggestion): lib/rspec/runner.rb If you do that, then people can use rSpec from within Ruby by writing: require 'rubygems' require 'rspec' require 'rspec/runner' context "..." do specify "..." do # ... end end ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-05-20 01:40 Message: > Do you want us to add this file to RSpec's svn? Where? Perhaps not this exact file (I'm not sure it meets your coding standards), but something similar. > How does it compare to spec.rb? spec.rb doesn't allow simply 'require'ing or 'load'ing it to use RSpec: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'rspec' => true irb(main):003:0> require 'spec' => false irb(main):004:0> load 'spec' Usage: spec [options] (FILE|DIRECTORY)+ -b, --backtrace Output full backtrace -f, --format FORMAT Output format (specdoc|s|rdoc|r) -d, --dry-run Don't execute specs -s, --spec SPECIFICATION_NAME Execute a single specification -v, --version Show version -h, --help Show this message I am looking for functionality like test/unit, where simply 'require'ing that library will bootstrap it upon exit: irb(main):001:0> require 'test/unit' => true irb(main):002:0> quit Loaded suite irb Started Finished in 0.000675 seconds. 0 tests, 0 assertions, 0 failures, 0 errors /usr/lib/ruby/1.8/irb.rb:76:in `throw': uncaught throw `IRB_EXIT' (NameError) from /usr/lib/ruby/1.8/irb.rb:76:in `irb_exit' from /usr/lib/ruby/1.8/irb/context.rb:226:in `exit' from /usr/lib/ruby/1.8/irb/extend-command.rb:24:in `exit' from /usr/lib/ruby/1.8/test/unit.rb:285 from /usr/bin/irb:13 > Can you give some more examples about how and when it's used? Please see the attached file. It is executed by a Ruby interpreter embedded inside a C program (a Verilog simulator in this case). It is essential to have the ability to bootstrap the RSpec library from within the attached file (like test/unit bootstaps itself just by being 'require'd). Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-05-18 18:50 Message: Do you want us to add this file to RSpec's svn? Where? How does it compare to spec.rb? Can you give some more examples about how and when it's used? For future reference - the ruby-talk link is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 From noreply at rubyforge.org Wed Dec 20 23:04:13 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Dec 2006 23:04:13 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-4462 ] Ability to use RSpec without the runner Message-ID: <20061221040414.2019F5241A80@rubyforge.org> Feature Requests item #4462, was opened at 2006-05-13 04:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 Category: None Group: None >Status: Closed Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Ability to use RSpec without the runner Initial Comment: Hello, I was previously using the Ruby test/unit framework with a Ruby interpreter embedded inside a C program. In such a situation, I am unable to use an external runner program to bootstrap the Ruby interpreter, and I need the ability to work the other way around: bootstrap RSpec from within Ruby. This problem was discussed and solved (see attached file) at [ruby-talk: 192569]. Thanks for your attention. ---------------------------------------------------------------------- >Comment By: Suraj Kurapati (snk) Date: 2006-12-21 04:04 Message: > Right now if you stand in the project root and say: > bin/spec examples/stack_spec.rb -fs > you'll get the same output as > ruby examples/stack_spec.rb -fs > I'm not sure if that solves your problem or not. Please let us know if this is really still a problem. Yes, this solves my problem. Now I am able to simply write: require 'rubygems' require 'spec' context "..." do specify "..." do # ... end end and use rSpec from within Ruby itself. Thank you very much! ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 03:31 Message: I looked at the ruby talk thread: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 The difference in behaviour between running the spec command and running specs via ruby is a bug that was fixed a while ago. Right now if you stand in the project root and say: bin/spec examples/stack_spec.rb -fs you'll get the same output as ruby examples/stack_spec.rb -fs I'm not sure if that solves your problem or not. Please let us know if this is really still a problem. Even if it is, adding the file to RSpec doesn't really make any sense to me without a spec that will prove that changes we make to the file will not break your environment (as it currently exists). Can you provide such? ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-21 00:49 Message: The reason I am making this request is because I am having to maintain rSpec-internals-specific code along with my hardware verification project (ruby-vpi). If I could get you guys to incorporate this code, then I don't have to keep watching if rSpec internal API changes and breaks my code. Also, it would be easier for you guys to maintain it because it uses your internal code base --- which you have most knowledge about. Seems like a reasonable request to me. :-/ ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-05 07:18 Message: Please see the new file (updated for rSpec 0.7.2). > Do you want us to add this file to RSpec's svn? Where? Yes. Please add it to SVN as (my suggestion): lib/rspec/runner.rb If you do that, then people can use rSpec from within Ruby by writing: require 'rubygems' require 'rspec' require 'rspec/runner' context "..." do specify "..." do # ... end end ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-05-20 01:40 Message: > Do you want us to add this file to RSpec's svn? Where? Perhaps not this exact file (I'm not sure it meets your coding standards), but something similar. > How does it compare to spec.rb? spec.rb doesn't allow simply 'require'ing or 'load'ing it to use RSpec: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'rspec' => true irb(main):003:0> require 'spec' => false irb(main):004:0> load 'spec' Usage: spec [options] (FILE|DIRECTORY)+ -b, --backtrace Output full backtrace -f, --format FORMAT Output format (specdoc|s|rdoc|r) -d, --dry-run Don't execute specs -s, --spec SPECIFICATION_NAME Execute a single specification -v, --version Show version -h, --help Show this message I am looking for functionality like test/unit, where simply 'require'ing that library will bootstrap it upon exit: irb(main):001:0> require 'test/unit' => true irb(main):002:0> quit Loaded suite irb Started Finished in 0.000675 seconds. 0 tests, 0 assertions, 0 failures, 0 errors /usr/lib/ruby/1.8/irb.rb:76:in `throw': uncaught throw `IRB_EXIT' (NameError) from /usr/lib/ruby/1.8/irb.rb:76:in `irb_exit' from /usr/lib/ruby/1.8/irb/context.rb:226:in `exit' from /usr/lib/ruby/1.8/irb/extend-command.rb:24:in `exit' from /usr/lib/ruby/1.8/test/unit.rb:285 from /usr/bin/irb:13 > Can you give some more examples about how and when it's used? Please see the attached file. It is executed by a Ruby interpreter embedded inside a C program (a Verilog simulator in this case). It is essential to have the ability to bootstrap the RSpec library from within the attached file (like test/unit bootstaps itself just by being 'require'd). Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-05-18 18:50 Message: Do you want us to add this file to RSpec's svn? Where? How does it compare to spec.rb? Can you give some more examples about how and when it's used? For future reference - the ruby-talk link is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192569 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=4462&group_id=797 From wilsonb at gmail.com Wed Dec 20 23:08:57 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Wed, 20 Dec 2006 23:08:57 -0500 Subject: [rspec-devel] [ rspec-Patches-7387 ] Allow stubs to return consecutive values In-Reply-To: <20061221024519.7D5545241A5E@rubyforge.org> References: <20061221024519.7D5545241A5E@rubyforge.org> Message-ID: On 12/20/06, noreply at rubyforge.org wrote: > Patches item #7387, was opened at 2006-12-20 12:32 > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7387&group_id=797 > > Category: mock module > Group: None > >Status: Closed > >Resolution: Accepted > Priority: 3 > Submitted By: Pat Maddox (pergesu) > Assigned to: David Chelimsky (dchelimsky) > Summary: Allow stubs to return consecutive values > > >Comment By: David Chelimsky (dchelimsky) > Date: 2006-12-21 02:45 > > Message: > Applied to trunk (rev 1333). > Awesome; thank you. This makes it MUCH easier to stub out ActiveRecord::Base.connection.insert From noreply at rubyforge.org Thu Dec 21 01:52:34 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 01:52:34 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7406 ] [PATCH] 0.7.5 rspec_on_rails loads fixtures into development database Message-ID: <20061221065234.34B5D5241A65@rubyforge.org> Patches item #7406, was opened at 2006-12-21 01:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7406&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Wilson Bilkovich (wilson) Assigned to: Nobody (None) Summary: [PATCH] 0.7.5 rspec_on_rails loads fixtures into development database Initial Comment: Revision 1272 reverted this line from spec_helper. rake spec now runs in development, rather than test. Nasty. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7406&group_id=797 From noreply at rubyforge.org Thu Dec 21 02:06:13 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 02:06:13 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7407 ] rspec 0.7.5 doesn't work with ruby-debug 0.5.1, but Test::Unit does Message-ID: <20061221070613.886855241A5F@rubyforge.org> Bugs item #7407, was opened at 2006-12-21 07:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7407&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: rspec 0.7.5 doesn't work with ruby-debug 0.5.1, but Test::Unit does Initial Comment: Hello, rSpec 0.7.5 is not working with ruby-debug 0.5.1's post-mortem debugging mode (see http://www.datanoise.com/articles/2006/12/20/post-mortem-debugging). However, Test::Unit works just fine with the post-mortem debugging mode. I am cross-posting this bug to ruby-debug tracker: http://rubyforge.org/tracker/?atid=7436&group_id=1900&func=browse ------------------------------------------------------------ Here are the input files needed to reproduce the bug: $ cat a.rb require 'rubygems' require 'spec' $ cat b.rb raise 'before loading rspec' require 'rubygems' require 'spec' $ cat c.rb require 'rubygems' require 'spec' raise 'after loading rspec' $ cat x.rb require 'test/unit' raise 'after loading Test::Unit' ------------------------------------------------------------ Here is the procedure to reproduce the bug: $ rdebug -m a.rb ./a.rb:1: require 'rubygems' (rdb:1) cont #Remark: everything went OK here -- rSpec was not involved. $ rdebug -m b.rb ./b.rb:1: raise 'before loading rspec' (rdb:1) cont ./b.rb:1: before loading rspec (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/bin/rdebug:89 from /usr/X11R6/bin/rdebug:18 #Remark: everything went OK here -- rSpec was not involved. $ rdebug -m b.rb ./b.rb:1: raise 'before loading rspec' (rdb:1) cont ./b.rb:1: raise 'before loading rspec' (rdb:post-mortem) list [-4, 5] in ./b.rb => 1 raise 'before loading rspec' 2 3 require 'rubygems' 4 require 'spec' (rdb:post-mortem) quit Really quit? (y/n) y #Remark: The 'before loading rspec' exception was raised *before* rSpec had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. Running the "list" command worked as expected. $ rdebug -m c.rb ./c.rb:1: require 'rubygems' (rdb:1) cont ./c.rb:4: raise 'after loading rspec' (rdb:post-mortem) list INTERNAL ERROR!!! wrong number of arguments (0 for 1) /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:110:in `context' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:110:in `process_commands' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:100:in `process_commands' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:66:in `__at_line' (eval):5:in `at_line' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' (eval):3:in `at_line' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug.rb:259:in `handle_post_mortem' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug.rb:253:in `post_mortem' /usr/X11R6/bin/rdebug:18./c.rb:4: after loading rspec (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/bin/rdebug:89 from /usr/X11R6/bin/rdebug:18 #Remark: The 'after loading rspec' exception was raised *after* rSpec had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. However, unlike the case with b.rb, the "list" command now caused a crash. $ rdebug -m x.rb ./x.rb:1: require 'test/unit' (rdb:1) cont ./x.rb:2: raise 'after loading Test::Unit' (rdb:post-mortem) list [-3, 6] in ./x.rb 1 require 'test/unit' => 2 raise 'after loading Test::Unit' (rdb:post-mortem) quit Really quit? (y/n) y #Remark: The 'after loading Test::Unit' exception was raised *after* Test::Unit had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. Running the "list" command worked as expected. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7407&group_id=797 From noreply at rubyforge.org Thu Dec 21 02:07:38 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 02:07:38 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7407 ] rspec 0.7.5 doesn't work with ruby-debug 0.5.1, but Test::Unit does Message-ID: <20061221070738.84CF75241A5F@rubyforge.org> Bugs item #7407, was opened at 2006-12-21 07:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7407&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: rspec 0.7.5 doesn't work with ruby-debug 0.5.1, but Test::Unit does Initial Comment: Hello, rSpec 0.7.5 is not working with ruby-debug 0.5.1's post-mortem debugging mode (see http://www.datanoise.com/articles/2006/12/20/post-mortem-debugging). However, Test::Unit works just fine with the post-mortem debugging mode. I am cross-posting this bug to ruby-debug tracker: http://rubyforge.org/tracker/?atid=7436&group_id=1900&func=browse ------------------------------------------------------------ Here are the input files needed to reproduce the bug: $ cat a.rb require 'rubygems' require 'spec' $ cat b.rb raise 'before loading rspec' require 'rubygems' require 'spec' $ cat c.rb require 'rubygems' require 'spec' raise 'after loading rspec' $ cat x.rb require 'test/unit' raise 'after loading Test::Unit' ------------------------------------------------------------ Here is the procedure to reproduce the bug: $ rdebug -m a.rb ./a.rb:1: require 'rubygems' (rdb:1) cont #Remark: everything went OK here -- rSpec was not involved. $ rdebug -m b.rb ./b.rb:1: raise 'before loading rspec' (rdb:1) cont ./b.rb:1: before loading rspec (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/bin/rdebug:89 from /usr/X11R6/bin/rdebug:18 #Remark: everything went OK here -- rSpec was not involved. $ rdebug -m b.rb ./b.rb:1: raise 'before loading rspec' (rdb:1) cont ./b.rb:1: raise 'before loading rspec' (rdb:post-mortem) list [-4, 5] in ./b.rb => 1 raise 'before loading rspec' 2 3 require 'rubygems' 4 require 'spec' (rdb:post-mortem) quit Really quit? (y/n) y #Remark: The 'before loading rspec' exception was raised *before* rSpec had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. Running the "list" command worked as expected. $ rdebug -m c.rb ./c.rb:1: require 'rubygems' (rdb:1) cont ./c.rb:4: raise 'after loading rspec' (rdb:post-mortem) list INTERNAL ERROR!!! wrong number of arguments (0 for 1) /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:110:in `context' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:110:in `process_commands' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:100:in `process_commands' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:66:in `__at_line' (eval):5:in `at_line' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' (eval):3:in `at_line' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug.rb:259:in `handle_post_mortem' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug.rb:253:in `post_mortem' /usr/X11R6/bin/rdebug:18./c.rb:4: after loading rspec (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/bin/rdebug:89 from /usr/X11R6/bin/rdebug:18 #Remark: The 'after loading rspec' exception was raised *after* rSpec had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. However, unlike the case with b.rb, the "list" command now caused a crash. $ rdebug -m x.rb ./x.rb:1: require 'test/unit' (rdb:1) cont ./x.rb:2: raise 'after loading Test::Unit' (rdb:post-mortem) list [-3, 6] in ./x.rb 1 require 'test/unit' => 2 raise 'after loading Test::Unit' (rdb:post-mortem) quit Really quit? (y/n) y #Remark: The 'after loading Test::Unit' exception was raised *after* Test::Unit had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. Running the "list" command worked as expected. ---------------------------------------------------------------------- >Comment By: Suraj Kurapati (snk) Date: 2006-12-21 07:07 Message: Here is a direct link to the cross-posted bug in the ruby-debug tracker: http://rubyforge.org/tracker/index.php?func=detail&aid=7408&group_id=1900&atid=7436 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7407&group_id=797 From noreply at rubyforge.org Thu Dec 21 02:23:06 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 02:23:06 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run. Message-ID: <20061221072307.0D0B15241A61@rubyforge.org> Bugs item #7409, was opened at 2006-12-21 07:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: default fixtures do not appear to run. Initial Comment: when I insert my default fixtures into the spec helper... "Nothing Happens" and all tests fail. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 From noreply at rubyforge.org Thu Dec 21 02:56:06 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 02:56:06 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7410 ] support for pre_loaded_fixtures Message-ID: <20061221075606.5F3FE5241A61@rubyforge.org> Feature Requests item #7410, was opened at 2006-12-21 08:56 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7410&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: Jens-Christian Fischer (jcfischer) Assigned to: Nobody (None) Summary: support for pre_loaded_fixtures Initial Comment: I have a project that uses pre_loaded_fixtures in it's test cases. I tried to use rspec 0.7.5 with it, but it fails with a Runtime Error from the fixtures classes ("Load fixtures before instantiating them") I made "pre_loaded_fixtures" available through an accessor (like the instantiated_fixtures etc.) but I'm stuck at that point. I looked through the fixtures.rb file to tried and understand the behaviour, but I don't grok it. Anyone out there with more fixtures-fu that could point me in the right direction, so that I can create a patch? thanks Jens-Christian ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7410&group_id=797 From noreply at rubyforge.org Thu Dec 21 05:14:09 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 05:14:09 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6317 ] c option for colorizing output does not work with rails_spec Message-ID: <20061221101409.533AB52409C0@rubyforge.org> Bugs item #6317, was opened at 2006-10-25 22:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Ed Howland (edhowland) Assigned to: Nobody (None) Summary: c option for colorizing output does not work with rails_spec Initial Comment: When using the -c, --color or --colur option with rails_spec (the sever client) the output is black, not red or green as in using rhe normal spec command. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-21 10:14 Message: I decided to do it this way: diff -upr rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb --- rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:47:16.000000000 -0800 @@ -5,10 +5,11 @@ module Spec # non-text based ones too - just ignore the +output+ constructor # argument. class BaseTextFormatter - def initialize(output, dry_run=false, colour=false) + def initialize(output, dry_run=false, colour=false, force_colour=false) @output = output @dry_run = dry_run - @colour = colour + @colour = colour || force_colour + @force_colour = force_colour begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ; raise "You must gem install win32console to use colour on Windows" ; end end @@ -96,7 +97,7 @@ module Spec end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @force_colour || (@colour && @output == Kernel) "#{colour_code}#{text}\e[0m" end diff -upr rspec-0.7.5/lib/spec/runner/option_parser.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb --- rspec-0.7.5/lib/spec/runner/option_parser.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb 2006-12-21 01:38:15.000000000 -0800 @@ -11,8 +11,7 @@ module Spec def create_context_runner(args, err, out, warn_if_no_files) options = parse(args, err, out, warn_if_no_files) - - formatter = options.formatter_type.new(options.out, options.dry_run, options.colour) + formatter = options.formatter_type.new(options.out, options.dry_run, options.colour, options.force_colour) options.reporter = Reporter.new(formatter, options.backtrace_tweaker) # this doesn't really belong here. @@ -71,6 +70,10 @@ module Spec options.colour = true end + opts.on("-C", "--force-colour", "--force-color", "force adding color codes regardless of output method") do + options.force_colour = true + end + opts.on("-s", "--spec SPECIFICATION_NAME", "Execute context or specification with matching name") do |spec_name| options.spec_name = spec_name end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-16 03:59 Message: following patch is better than the last post? Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1114) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -96,10 +96,18 @@ end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @colour && output_to_stdout? "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.tty? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-16 01:41 Message: How about following patches. It's not smart, but works. Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1111) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -100,6 +100,14 @@ "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.stdout? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end Index: vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec =================================================================== --- vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (revision 1111) +++ vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (working copy) @@ -5,7 +5,10 @@ begin DRb.start_service rails_spec_server = DRbObject.new_with_uri("druby://localhost:8989") + STDOUT.instance_eval do + def stdout?; self == STDOUT end + end rails_spec_server.run(ARGV, STDERR, STDOUT) rescue DRb::DRbConnError puts "No rails_spec_server is running. Please start one via 'script/rails_spec_server'" -end \ No newline at end of file +end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 From noreply at rubyforge.org Thu Dec 21 07:44:44 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 07:44:44 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7406 ] [PATCH] 0.7.5 rspec_on_rails loads fixtures into development database Message-ID: <20061221124444.49EBD5240C7B@rubyforge.org> Patches item #7406, was opened at 2006-12-21 06:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7406&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Wilson Bilkovich (wilson) >Assigned to: David Chelimsky (dchelimsky) Summary: [PATCH] 0.7.5 rspec_on_rails loads fixtures into development database Initial Comment: Revision 1272 reverted this line from spec_helper. rake spec now runs in development, rather than test. Nasty. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 12:44 Message: YUCK! Applied to trunk (rev 1335) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7406&group_id=797 From noreply at rubyforge.org Thu Dec 21 07:50:32 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 07:50:32 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run. Message-ID: <20061221125032.BE2105240C34@rubyforge.org> Bugs item #7409, was opened at 2006-12-21 07:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: default fixtures do not appear to run. Initial Comment: when I insert my default fixtures into the spec helper... "Nothing Happens" and all tests fail. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 12:50 Message: Please add the following to the top of spec_helper and tell us if you still experience the problem: ENV["RAILS_ENV"] = "test" This was errantly removed from spec_helper. It has now been replaced (in trunk), so if that solves your problem we can close this ticket. Thanks ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 From noreply at rubyforge.org Thu Dec 21 12:05:26 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 12:05:26 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7101 ] warning: useless use of == in void context Message-ID: <20061221170526.986EA5240C34@rubyforge.org> Bugs item #7101, was opened at 2006-12-05 01:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: warning: useless use of == in void context Initial Comment: The new "should ==" syntax of rSpec (versions > 0.7.0) is causing these warnings: warning: useless use of == in void context In particular, each line of the following code causes the above warning: L0d_cache.l0d_p_rd_nack.intVal.should == 1 L0d_cache.l0d_l1_req.intVal.should == 1 Finally, I am seeing these warnings because I always run ruby with the '-w' option: 'ruby -w' Thanks for your consideration. ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-20 19:55 Message: Alright, I'm running my specs without -w for now. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-05 02:54 Message: I don't think there is anything we can do about that - except for running without the -w flag. What do you think? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7101&group_id=797 From noreply at rubyforge.org Thu Dec 21 12:07:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 12:07:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7402 ] Documentation Bug: Installation Instructions Message-ID: <20061221170758.247665240C34@rubyforge.org> Bugs item #7402, was opened at 2006-12-20 22:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7402&group_id=797 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Jonathan Simms (slyphon) >Assigned to: David Chelimsky (dchelimsky) Summary: Documentation Bug: Installation Instructions Initial Comment: Hey, just a little detail on the page: http://rspec.rubyforge.org/documentation/rails/install.html "RSpec on Rails is a regular Rails plugin. It can be installed via your Rails app?s script/plugin tool. In the examples below ? make sure you replace X_Y_Z with the version of the plugin you want to install. It?s important that the REL_X_Y_Z corresponds to the version of RSpec core you have installed ? for example REL_0_7_0." First, the command line given is incorrect: "ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/rspec_on_rails/vendor/plugin/rspec_on_rails" the path should be (in part) "vendor/plugins" (plural) Next, and this is merely a suggestion, I installed RSpec 0.7.4 (at first), and when I tried the above method to install the rails plugin: slyphon at ubangy rspec-try $ ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/rspec_on_rails/vendor/plugins/rspec_on_rails Export complete. yet my vendor/plugins directory was empty. I then tried an 'svn ls' slyphon at ubangy rspec-try $ svn ls svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/rspec_on_rails/ svn: URL 'svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/rspec_on_rails' non-existent in that revision It appears that as of REL_0_7_5, the above instructions will work, but they will fail for users with earlier releases. It'd probably be useful for newbies if you mention this. Anyhoo, I look forward to trying out RSpec with great anticipation! -Jonathan Simms ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-21 12:07 Message: Dupe of another issue. Fixed. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7402&group_id=797 From noreply at rubyforge.org Thu Dec 21 12:13:24 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 12:13:24 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6317 ] c option for colorizing output does not work with rails_spec Message-ID: <20061221171324.998855240C34@rubyforge.org> Bugs item #6317, was opened at 2006-10-25 18:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Ed Howland (edhowland) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: c option for colorizing output does not work with rails_spec Initial Comment: When using the -c, --color or --colur option with rails_spec (the sever client) the output is black, not red or green as in using rhe normal spec command. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-21 12:13 Message: Thanks both of you. Please attach the patches as real attachments - the website breaks up the lines. Don't forget to check the atrtachment checkbox. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-21 05:14 Message: I decided to do it this way: diff -upr rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb --- rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:47:16.000000000 -0800 @@ -5,10 +5,11 @@ module Spec # non-text based ones too - just ignore the +output+ constructor # argument. class BaseTextFormatter - def initialize(output, dry_run=false, colour=false) + def initialize(output, dry_run=false, colour=false, force_colour=false) @output = output @dry_run = dry_run - @colour = colour + @colour = colour || force_colour + @force_colour = force_colour begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ; raise "You must gem install win32console to use colour on Windows" ; end end @@ -96,7 +97,7 @@ module Spec end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @force_colour || (@colour && @output == Kernel) "#{colour_code}#{text}\e[0m" end diff -upr rspec-0.7.5/lib/spec/runner/option_parser.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb --- rspec-0.7.5/lib/spec/runner/option_parser.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb 2006-12-21 01:38:15.000000000 -0800 @@ -11,8 +11,7 @@ module Spec def create_context_runner(args, err, out, warn_if_no_files) options = parse(args, err, out, warn_if_no_files) - - formatter = options.formatter_type.new(options.out, options.dry_run, options.colour) + formatter = options.formatter_type.new(options.out, options.dry_run, options.colour, options.force_colour) options.reporter = Reporter.new(formatter, options.backtrace_tweaker) # this doesn't really belong here. @@ -71,6 +70,10 @@ module Spec options.colour = true end + opts.on("-C", "--force-colour", "--force-color", "force adding color codes regardless of output method") do + options.force_colour = true + end + opts.on("-s", "--spec SPECIFICATION_NAME", "Execute context or specification with matching name") do |spec_name| options.spec_name = spec_name end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-15 22:59 Message: following patch is better than the last post? Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1114) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -96,10 +96,18 @@ end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @colour && output_to_stdout? "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.tty? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-15 20:41 Message: How about following patches. It's not smart, but works. Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1111) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -100,6 +100,14 @@ "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.stdout? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end Index: vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec =================================================================== --- vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (revision 1111) +++ vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (working copy) @@ -5,7 +5,10 @@ begin DRb.start_service rails_spec_server = DRbObject.new_with_uri("druby://localhost:8989") + STDOUT.instance_eval do + def stdout?; self == STDOUT end + end rails_spec_server.run(ARGV, STDERR, STDOUT) rescue DRb::DRbConnError puts "No rails_spec_server is running. Please start one via 'script/rails_spec_server'" -end \ No newline at end of file +end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 From noreply at rubyforge.org Thu Dec 21 12:43:07 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Dec 2006 12:43:07 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run. Message-ID: <20061221174307.984845240DA5@rubyforge.org> Bugs item #7409, was opened at 2006-12-21 07:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: default fixtures do not appear to run. Initial Comment: when I insert my default fixtures into the spec helper... "Nothing Happens" and all tests fail. ---------------------------------------------------------------------- >Comment By: Dallas Pool (codeninja) Date: 2006-12-21 17:43 Message: This line (ENV["RAILS_ENV"] = "test") is currently in the top of my spec_helper.rb and I snagged the plugin directly from trunk 2 days ago. The problem persists. Please advise. Thanks. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 12:50 Message: Please add the following to the top of spec_helper and tell us if you still experience the problem: ENV["RAILS_ENV"] = "test" This was errantly removed from spec_helper. It has now been replaced (in trunk), so if that solves your problem we can close this ticket. Thanks ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 From noreply at rubyforge.org Fri Dec 22 01:10:46 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Dec 2006 01:10:46 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7419 ] "c option for colorizing output does not work with rails_spec" Message-ID: <20061222061046.8E6F6524187E@rubyforge.org> Patches item #7419, was opened at 2006-12-22 15:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7419&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Shintaro Kakutani (kakutani) Assigned to: Nobody (None) Summary: "c option for colorizing output does not work with rails_spec" Initial Comment: Following attachment file is patch for #6317 (including spec) http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7419&group_id=797 From noreply at rubyforge.org Fri Dec 22 01:13:49 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Dec 2006 01:13:49 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6317 ] c option for colorizing output does not work with rails_spec Message-ID: <20061222061349.290D6524187E@rubyforge.org> Bugs item #6317, was opened at 2006-10-26 07:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Ed Howland (edhowland) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: c option for colorizing output does not work with rails_spec Initial Comment: When using the -c, --color or --colur option with rails_spec (the sever client) the output is black, not red or green as in using rhe normal spec command. ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-12-22 15:13 Message: I've posted my patch(w/ spec) to the 'Patches' tracker. http://rubyforge.org/tracker/index.php?func=detail&aid=7419&group_id=797&atid=3151 (Is there an attachment form in this page??) ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-22 02:13 Message: Thanks both of you. Please attach the patches as real attachments - the website breaks up the lines. Don't forget to check the atrtachment checkbox. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-21 19:14 Message: I decided to do it this way: diff -upr rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb --- rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:47:16.000000000 -0800 @@ -5,10 +5,11 @@ module Spec # non-text based ones too - just ignore the +output+ constructor # argument. class BaseTextFormatter - def initialize(output, dry_run=false, colour=false) + def initialize(output, dry_run=false, colour=false, force_colour=false) @output = output @dry_run = dry_run - @colour = colour + @colour = colour || force_colour + @force_colour = force_colour begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ; raise "You must gem install win32console to use colour on Windows" ; end end @@ -96,7 +97,7 @@ module Spec end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @force_colour || (@colour && @output == Kernel) "#{colour_code}#{text}\e[0m" end diff -upr rspec-0.7.5/lib/spec/runner/option_parser.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb --- rspec-0.7.5/lib/spec/runner/option_parser.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb 2006-12-21 01:38:15.000000000 -0800 @@ -11,8 +11,7 @@ module Spec def create_context_runner(args, err, out, warn_if_no_files) options = parse(args, err, out, warn_if_no_files) - - formatter = options.formatter_type.new(options.out, options.dry_run, options.colour) + formatter = options.formatter_type.new(options.out, options.dry_run, options.colour, options.force_colour) options.reporter = Reporter.new(formatter, options.backtrace_tweaker) # this doesn't really belong here. @@ -71,6 +70,10 @@ module Spec options.colour = true end + opts.on("-C", "--force-colour", "--force-color", "force adding color codes regardless of output method") do + options.force_colour = true + end + opts.on("-s", "--spec SPECIFICATION_NAME", "Execute context or specification with matching name") do |spec_name| options.spec_name = spec_name end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-16 12:59 Message: following patch is better than the last post? Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1114) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -96,10 +96,18 @@ end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @colour && output_to_stdout? "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.tty? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-16 10:41 Message: How about following patches. It's not smart, but works. Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1111) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -100,6 +100,14 @@ "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.stdout? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end Index: vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec =================================================================== --- vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (revision 1111) +++ vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (working copy) @@ -5,7 +5,10 @@ begin DRb.start_service rails_spec_server = DRbObject.new_with_uri("druby://localhost:8989") + STDOUT.instance_eval do + def stdout?; self == STDOUT end + end rails_spec_server.run(ARGV, STDERR, STDOUT) rescue DRb::DRbConnError puts "No rails_spec_server is running. Please start one via 'script/rails_spec_server'" -end \ No newline at end of file +end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 From noreply at rubyforge.org Fri Dec 22 10:56:26 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Dec 2006 10:56:26 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-6317 ] c option for colorizing output does not work with rails_spec Message-ID: <20061222155626.BD0475241174@rubyforge.org> Bugs item #6317, was opened at 2006-10-25 18:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Out of Date Priority: 3 Submitted By: Ed Howland (edhowland) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: c option for colorizing output does not work with rails_spec Initial Comment: When using the -c, --color or --colur option with rails_spec (the sever client) the output is black, not red or green as in using rhe normal spec command. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-22 10:56 Message: Duplicated by http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7419&group_id=797 ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-12-22 01:13 Message: I've posted my patch(w/ spec) to the 'Patches' tracker. http://rubyforge.org/tracker/index.php?func=detail&aid=7419&group_id=797&atid=3151 (Is there an attachment form in this page??) ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-21 12:13 Message: Thanks both of you. Please attach the patches as real attachments - the website breaks up the lines. Don't forget to check the atrtachment checkbox. ---------------------------------------------------------------------- Comment By: Michael Johnston (lastobelus) Date: 2006-12-21 05:14 Message: I decided to do it this way: diff -upr rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb --- rspec-0.7.5/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/formatter/base_text_formatter.rb 2006-12-21 01:47:16.000000000 -0800 @@ -5,10 +5,11 @@ module Spec # non-text based ones too - just ignore the +output+ constructor # argument. class BaseTextFormatter - def initialize(output, dry_run=false, colour=false) + def initialize(output, dry_run=false, colour=false, force_colour=false) @output = output @dry_run = dry_run - @colour = colour + @colour = colour || force_colour + @force_colour = force_colour begin ; require 'Win32/Console/ANSI' if @colour && PLATFORM =~ /win32/ ; rescue LoadError ; raise "You must gem install win32console to use colour on Windows" ; end end @@ -96,7 +97,7 @@ module Spec end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @force_colour || (@colour && @output == Kernel) "#{colour_code}#{text}\e[0m" end diff -upr rspec-0.7.5/lib/spec/runner/option_parser.rb rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb --- rspec-0.7.5/lib/spec/runner/option_parser.rb 2006-12-21 01:42:44.000000000 -0800 +++ rspec-0.7.5_with_colour_patch/lib/spec/runner/option_parser.rb 2006-12-21 01:38:15.000000000 -0800 @@ -11,8 +11,7 @@ module Spec def create_context_runner(args, err, out, warn_if_no_files) options = parse(args, err, out, warn_if_no_files) - - formatter = options.formatter_type.new(options.out, options.dry_run, options.colour) + formatter = options.formatter_type.new(options.out, options.dry_run, options.colour, options.force_colour) options.reporter = Reporter.new(formatter, options.backtrace_tweaker) # this doesn't really belong here. @@ -71,6 +70,10 @@ module Spec options.colour = true end + opts.on("-C", "--force-colour", "--force-color", "force adding color codes regardless of output method") do + options.force_colour = true + end + opts.on("-s", "--spec SPECIFICATION_NAME", "Execute context or specification with matching name") do |spec_name| options.spec_name = spec_name end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-15 22:59 Message: following patch is better than the last post? Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1114) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -96,10 +96,18 @@ end def colour(text, colour_code) - return text unless @colour && @output == Kernel + return text unless @colour && output_to_stdout? "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.tty? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end ---------------------------------------------------------------------- Comment By: Shintaro Kakutani (kakutani) Date: 2006-11-15 20:41 Message: How about following patches. It's not smart, but works. Index: lib/spec/runner/formatter/base_text_formatter.rb =================================================================== --- lib/spec/runner/formatter/base_text_formatter.rb (revision 1111) +++ lib/spec/runner/formatter/base_text_formatter.rb (working copy) @@ -100,6 +100,14 @@ "#{colour_code}#{text}\e[0m" end + def output_to_stdout? + begin + @output == Kernel || @output.stdout? + rescue NoMethodError + false + end + end + def red(text); colour(text, "\e[31m"); end def green(text); colour(text, "\e[32m"); end def magenta(text); colour(text, "\e[35m"); end @@ -107,4 +115,4 @@ end end end -end \ No newline at end of file +end Index: vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec =================================================================== --- vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (revision 1111) +++ vendor/rspec_on_rails/vendor/plugins/rspec/generators/rspec/templates/script/rails_spec (working copy) @@ -5,7 +5,10 @@ begin DRb.start_service rails_spec_server = DRbObject.new_with_uri("druby://localhost:8989") + STDOUT.instance_eval do + def stdout?; self == STDOUT end + end rails_spec_server.run(ARGV, STDERR, STDOUT) rescue DRb::DRbConnError puts "No rails_spec_server is running. Please start one via 'script/rails_spec_server'" -end \ No newline at end of file +end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 From noreply at rubyforge.org Fri Dec 22 11:18:29 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Dec 2006 11:18:29 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7419 ] "c option for colorizing output does not work with rails_spec" Message-ID: <20061222161829.24FCD524117D@rubyforge.org> Patches item #7419, was opened at 2006-12-22 01:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7419&group_id=797 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Shintaro Kakutani (kakutani) >Assigned to: Aslak Helles?y (aslak_hellesoy) >Summary: "c option for colorizing output does not work with rails_spec" Initial Comment: Following attachment file is patch for #6317 (including spec) http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6317&group_id=797 ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-22 11:18 Message: Very nice patch. Thanks! Applied in r1337 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7419&group_id=797 From noreply at rubyforge.org Sat Dec 23 22:21:38 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Dec 2006 22:21:38 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7339 ] Turn off caching in HTML reports Message-ID: <20061224032138.584F05241E5F@rubyforge.org> Patches item #7339, was opened at 2006-12-18 08:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Aslak Helles?y (aslak_hellesoy) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Turn off caching in HTML reports Initial Comment: This needs to go in the header: ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-23 22:21 Message: Fixed in r1341 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 08:43 Message: There should also be a hook to add custom headers, like (auto-refresh every 10 seconds) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 From noreply at rubyforge.org Sat Dec 23 22:21:59 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Dec 2006 22:21:59 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7339 ] Turn off caching in HTML reports Message-ID: <20061224032159.E464E5241E5F@rubyforge.org> Patches item #7339, was opened at 2006-12-18 08:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Aslak Helles?y (aslak_hellesoy) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Turn off caching in HTML reports Initial Comment: This needs to go in the header: ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-23 22:21 Message: Fixed in r1341 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-18 08:43 Message: There should also be a hook to add custom headers, like (auto-refresh every 10 seconds) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7339&group_id=797 From noreply at rubyforge.org Sat Dec 23 22:35:55 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Dec 2006 22:35:55 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7143 ] Spec::Runner::ContextRunner doesn't always return exit code Message-ID: <20061224033555.C73995241E6E@rubyforge.org> Bugs item #7143, was opened at 2006-12-07 01:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 Category: runner module Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Chad Woolley (thewoolleyman) >Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Spec::Runner::ContextRunner doesn't always return exit code Initial Comment: Spec::Runner::ContextRunner.run doesn't return a valid exit code if 'exit_when_done' is false. FIX: Simply add 'exit_code' as the last line of the 'run' method. This is a one-liner, let me know if you need a patch. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-23 22:35 Message: The run method returns the number of failures. This is a fairly recent change (added for the Heckle support), but prior to this change I don't think the return value from run was being used for anything. The suggested change is now invalid. Please submit a new patch with specs if you still feel something needs work here. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-07 07:57 Message: A patch *with a spec* would be great! Thanks, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 From noreply at rubyforge.org Sat Dec 23 23:10:45 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Dec 2006 23:10:45 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7429 ] should_equal fails, comparing 2 identical hash tables Message-ID: <20061224041045.A245C5241E6F@rubyforge.org> Bugs item #7429, was opened at 2006-12-23 20:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 Category: expectation module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Steve Jorgensen (jorgens) Assigned to: Nobody (None) Summary: should_equal fails, comparing 2 identical hash tables Initial Comment: If I try to use should_equal with hash tables, it always results in a failure, even when the hash tables have identical contents, and the Ruby == operator returns true for the same comparison. Given a file, test.rb as follows... context "foo" do specify "xxx" do {:v => ''}.should_equal :v => '' end end ... C:\1home>spec test.rb F 1) 'foo xxx' FAILED {:v=>""} should equal {:v=>""} ./test.rb:4: Finished in 0.0 seconds 1 specification, 1 failure ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 From noreply at rubyforge.org Sat Dec 23 23:18:35 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Dec 2006 23:18:35 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7429 ] should_equal fails, comparing 2 identical hash tables Message-ID: <20061224041835.A54245241E70@rubyforge.org> Bugs item #7429, was opened at 2006-12-24 04:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 Category: expectation module Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Steve Jorgensen (jorgens) >Assigned to: David Chelimsky (dchelimsky) Summary: should_equal fails, comparing 2 identical hash tables Initial Comment: If I try to use should_equal with hash tables, it always results in a failure, even when the hash tables have identical contents, and the Ruby == operator returns true for the same comparison. Given a file, test.rb as follows... context "foo" do specify "xxx" do {:v => ''}.should_equal :v => '' end end ... C:\1home>spec test.rb F 1) 'foo xxx' FAILED {:v=>""} should equal {:v=>""} ./test.rb:4: Finished in 0.0 seconds 1 specification, 1 failure ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-24 04:18 Message: You should use should_eql. Please read http://rspec.rubyforge.org/documentation/expectations.html. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 From noreply at rubyforge.org Sat Dec 23 23:29:57 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Dec 2006 23:29:57 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7407 ] rspec 0.7.5 doesn't work with ruby-debug 0.5.1, but Test::Unit does Message-ID: <20061224042957.5C35E5241E6F@rubyforge.org> Bugs item #7407, was opened at 2006-12-21 07:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7407&group_id=797 Category: None Group: None >Status: Closed >Resolution: Out of Date Priority: 3 Submitted By: Suraj Kurapati (snk) Assigned to: Nobody (None) Summary: rspec 0.7.5 doesn't work with ruby-debug 0.5.1, but Test::Unit does Initial Comment: Hello, rSpec 0.7.5 is not working with ruby-debug 0.5.1's post-mortem debugging mode (see http://www.datanoise.com/articles/2006/12/20/post-mortem-debugging). However, Test::Unit works just fine with the post-mortem debugging mode. I am cross-posting this bug to ruby-debug tracker: http://rubyforge.org/tracker/?atid=7436&group_id=1900&func=browse ------------------------------------------------------------ Here are the input files needed to reproduce the bug: $ cat a.rb require 'rubygems' require 'spec' $ cat b.rb raise 'before loading rspec' require 'rubygems' require 'spec' $ cat c.rb require 'rubygems' require 'spec' raise 'after loading rspec' $ cat x.rb require 'test/unit' raise 'after loading Test::Unit' ------------------------------------------------------------ Here is the procedure to reproduce the bug: $ rdebug -m a.rb ./a.rb:1: require 'rubygems' (rdb:1) cont #Remark: everything went OK here -- rSpec was not involved. $ rdebug -m b.rb ./b.rb:1: raise 'before loading rspec' (rdb:1) cont ./b.rb:1: before loading rspec (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/bin/rdebug:89 from /usr/X11R6/bin/rdebug:18 #Remark: everything went OK here -- rSpec was not involved. $ rdebug -m b.rb ./b.rb:1: raise 'before loading rspec' (rdb:1) cont ./b.rb:1: raise 'before loading rspec' (rdb:post-mortem) list [-4, 5] in ./b.rb => 1 raise 'before loading rspec' 2 3 require 'rubygems' 4 require 'spec' (rdb:post-mortem) quit Really quit? (y/n) y #Remark: The 'before loading rspec' exception was raised *before* rSpec had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. Running the "list" command worked as expected. $ rdebug -m c.rb ./c.rb:1: require 'rubygems' (rdb:1) cont ./c.rb:4: raise 'after loading rspec' (rdb:post-mortem) list INTERNAL ERROR!!! wrong number of arguments (0 for 1) /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:110:in `context' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:110:in `process_commands' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:100:in `process_commands' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug/processor.rb:66:in `__at_line' (eval):5:in `at_line' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' (eval):3:in `at_line' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug.rb:259:in `handle_post_mortem' /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/lib/ruby-debug.rb:253:in `post_mortem' /usr/X11R6/bin/rdebug:18./c.rb:4: after loading rspec (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.5.1/bin/rdebug:89 from /usr/X11R6/bin/rdebug:18 #Remark: The 'after loading rspec' exception was raised *after* rSpec had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. However, unlike the case with b.rb, the "list" command now caused a crash. $ rdebug -m x.rb ./x.rb:1: require 'test/unit' (rdb:1) cont ./x.rb:2: raise 'after loading Test::Unit' (rdb:post-mortem) list [-3, 6] in ./x.rb 1 require 'test/unit' => 2 raise 'after loading Test::Unit' (rdb:post-mortem) quit Really quit? (y/n) y #Remark: The 'after loading Test::Unit' exception was raised *after* Test::Unit had been loaded. This caused ruby-debug to catch the exception and show us the prompt for the post-mortem debugging mode. Running the "list" command worked as expected. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-24 04:29 Message: Looks like this got fixed over at ruby-debug: http://rubyforge.org/tracker/index.php?func=detail&aid=7408&group_id=1900&atid=7436 ---------------------------------------------------------------------- Comment By: Suraj Kurapati (snk) Date: 2006-12-21 07:07 Message: Here is a direct link to the cross-posted bug in the ruby-debug tracker: http://rubyforge.org/tracker/index.php?func=detail&aid=7408&group_id=1900&atid=7436 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7407&group_id=797 From noreply at rubyforge.org Sun Dec 24 00:11:56 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 24 Dec 2006 00:11:56 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7429 ] should_equal fails, comparing 2 identical hash tables Message-ID: <20061224051156.E12AE5241E70@rubyforge.org> Bugs item #7429, was opened at 2006-12-23 20:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 Category: expectation module Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Steve Jorgensen (jorgens) Assigned to: David Chelimsky (dchelimsky) Summary: should_equal fails, comparing 2 identical hash tables Initial Comment: If I try to use should_equal with hash tables, it always results in a failure, even when the hash tables have identical contents, and the Ruby == operator returns true for the same comparison. Given a file, test.rb as follows... context "foo" do specify "xxx" do {:v => ''}.should_equal :v => '' end end ... C:\1home>spec test.rb F 1) 'foo xxx' FAILED {:v=>""} should equal {:v=>""} ./test.rb:4: Finished in 0.0 seconds 1 specification, 1 failure ---------------------------------------------------------------------- >Comment By: Steve Jorgensen (jorgens) Date: 2006-12-23 21:11 Message: After reading the documentation you pointed me to, your answer makes complete sense. However, when I change the should_equal call to a should_eql call, it still fails. F 1) 'foo xxx' FAILED {:v=>""} should eql {:v=>""} ./test.rb:4: Finished in 0.0 seconds 1 specification, 1 failure ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-23 20:18 Message: You should use should_eql. Please read http://rspec.rubyforge.org/documentation/expectations.html. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 From noreply at rubyforge.org Sun Dec 24 00:21:02 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 24 Dec 2006 00:21:02 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7429 ] should_equal fails, comparing 2 identical hash tables Message-ID: <20061224052102.8D5595241E49@rubyforge.org> Bugs item #7429, was opened at 2006-12-24 04:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 Category: expectation module Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Steve Jorgensen (jorgens) Assigned to: David Chelimsky (dchelimsky) Summary: should_equal fails, comparing 2 identical hash tables Initial Comment: If I try to use should_equal with hash tables, it always results in a failure, even when the hash tables have identical contents, and the Ruby == operator returns true for the same comparison. Given a file, test.rb as follows... context "foo" do specify "xxx" do {:v => ''}.should_equal :v => '' end end ... C:\1home>spec test.rb F 1) 'foo xxx' FAILED {:v=>""} should equal {:v=>""} ./test.rb:4: Finished in 0.0 seconds 1 specification, 1 failure ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-24 05:21 Message: Ah. That's ruby at work. As you pointed out, == works. I led you astray w/ eql (which actually does NOT work for this comparison): irb(main):009:0> {:v=>""} == {:v=>""} => true irb(main):007:0> {:v=>""}.eql?({:v=>""}) => false This will solve your problem: {:v=>""}.should == {:v=>""} Sorry for pointing you in only 1/2 the right direction! Cheers, David ---------------------------------------------------------------------- Comment By: Steve Jorgensen (jorgens) Date: 2006-12-24 05:11 Message: After reading the documentation you pointed me to, your answer makes complete sense. However, when I change the should_equal call to a should_eql call, it still fails. F 1) 'foo xxx' FAILED {:v=>""} should eql {:v=>""} ./test.rb:4: Finished in 0.0 seconds 1 specification, 1 failure ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-24 04:18 Message: You should use should_eql. Please read http://rspec.rubyforge.org/documentation/expectations.html. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797 From noreply at rubyforge.org Sun Dec 24 05:42:23 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 24 Dec 2006 05:42:23 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7143 ] Spec::Runner::ContextRunner doesn't always return exit code Message-ID: <20061224104223.F36C15240ACC@rubyforge.org> Bugs item #7143, was opened at 2006-12-06 23:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 Category: runner module Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: Chad Woolley (thewoolleyman) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Spec::Runner::ContextRunner doesn't always return exit code Initial Comment: Spec::Runner::ContextRunner.run doesn't return a valid exit code if 'exit_when_done' is false. FIX: Simply add 'exit_code' as the last line of the 'run' method. This is a one-liner, let me know if you need a patch. ---------------------------------------------------------------------- >Comment By: Chad Woolley (thewoolleyman) Date: 2006-12-24 03:42 Message: Nope. works perfectly now. Thanks. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-23 20:35 Message: The run method returns the number of failures. This is a fairly recent change (added for the Heckle support), but prior to this change I don't think the return value from run was being used for anything. The suggested change is now invalid. Please submit a new patch with specs if you still feel something needs work here. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-07 05:57 Message: A patch *with a spec* would be great! Thanks, David ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7143&group_id=797 From noreply at rubyforge.org Tue Dec 26 11:41:52 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 26 Dec 2006 11:41:52 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7461 ] [PATCH] Contexts don't call Module::included when they include a module Message-ID: <20061226164152.D66ED5240F9D@rubyforge.org> Patches item #7461, was opened at 2006-12-26 09:41 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: [PATCH] Contexts don't call Module::included when they include a module Initial Comment: module MyModule module ClassMethods def foo "foo" end end def self.included(receiver) receiver.extend ClassMethods end end context "Test context" do include MyModule foo end blows up because foo isn't defined. It turns out that the included method isn't being called at all. Now regardless of whether you think it's okay to use included like this to automatically extend a class, or you think that you should explicitly extend a class instead, Contexts shouldn't break Ruby's included callback method. This patch fixes it up. It just adds mod.send :included, self to Context and ContextEval. I included a spec for it, but it comes with a warning. The "mod.send" line is required in Context for the spec to pass. But if you just use that in code, then the code will fail. You have to have "mod.send" in ContextEval as well. However, the spec doesn't fail if you don't call it in ContextEval. So basically, the call in ContextEval is necessary for the desired behavior, but isn't covered by a spec. I haven't been able to come up with a failing spec for it...so hopefully someone who knows the RSpec internals better than I can come up with it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 From aslak.hellesoy at gmail.com Tue Dec 26 23:35:38 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Wed, 27 Dec 2006 05:35:38 +0100 Subject: [rspec-devel] New Gem: spec/ui Message-ID: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> Hi all, A few weeks ago I blogged about how to get pretty RSpec/Watir HTML reports with screenshots (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir). I have taken the code and wrapped it up as a gem (still unreleased). If you check out the trunk you'll find it under spec_ui. There isn't a lot of documentation, but there are two examples in there, one for Watir/Safariwatir and one for Selenium-RC. I'd appreciate some feedback on this - I'd like to make this gem part of the next release. Aslak From wilsonb at gmail.com Wed Dec 27 01:39:34 2006 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Wed, 27 Dec 2006 01:39:34 -0500 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> Message-ID: On 12/26/06, aslak hellesoy wrote: > Hi all, > > A few weeks ago I blogged about how to get pretty RSpec/Watir HTML > reports with screenshots > (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir). > > I have taken the code and wrapped it up as a gem (still unreleased). > If you check out the trunk you'll find it under spec_ui. > > There isn't a lot of documentation, but there are two examples in > there, one for Watir/Safariwatir and one for Selenium-RC. > > I'd appreciate some feedback on this - I'd like to make this gem part > of the next release. > Totally awesome. From shane.duan at gmail.com Wed Dec 27 02:29:44 2006 From: shane.duan at gmail.com (Shane Duan) Date: Tue, 26 Dec 2006 23:29:44 -0800 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> Message-ID: Nice... I happen to be looking into the same thing. I registered the 'selenium' project on rubyforge last week with the following goal: * Wrap selenium server in ruby script so that you can start and stop it through ruby. Selenium server is under apache license so I don't think there will be problem bundling it as part of the gem. In this way, people can just install selenium gem and Java and can start writing tests right away. * Wrap selenium ruby driver API into watir style API because I have found that watir style leads to better testing code that are scalable and easy to maintain. * helper to provide screen shots. Is that on your plate? If so, you can take over this project and I'd love to help out. Cheers, Shane On 12/26/06, aslak hellesoy wrote: > Hi all, > > A few weeks ago I blogged about how to get pretty RSpec/Watir HTML > reports with screenshots > (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir). > > I have taken the code and wrapped it up as a gem (still unreleased). > If you check out the trunk you'll find it under spec_ui. > > There isn't a lot of documentation, but there are two examples in > there, one for Watir/Safariwatir and one for Selenium-RC. > > I'd appreciate some feedback on this - I'd like to make this gem part > of the next release. > > Aslak > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Shane http://www.shaneduan.com From aslak.hellesoy at gmail.com Wed Dec 27 08:37:59 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Wed, 27 Dec 2006 14:37:59 +0100 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> Message-ID: <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> On 12/27/06, Shane Duan wrote: > Nice... > > I happen to be looking into the same thing. I registered the > 'selenium' project on rubyforge last week with the following goal: > > * Wrap selenium server in ruby script so that you can start and stop > it through ruby. Selenium server is under apache license so I don't > think there will be problem bundling it as part of the gem. In this > way, people can just install selenium gem and Java and can start > writing tests right away. > * Wrap selenium ruby driver API into watir style API because I have > found that watir style leads to better testing code that are scalable > and easy to maintain. That would be great! How easy do you think it will be? Are the APIs mostly compatible? > * helper to provide screen shots. > I have already done this in spec/ui. See the selenium example and the selenium_helper.rb In fact, the screenshot stuff isn't related to the web testing framework at all, except for the little piece of code that grabs the HTML source. (My goal down the road with spec/ui is to use it for other UI testing tools as well. Some Watir-like library for Flex would be great). > Is that on your plate? If so, you can take over this project and I'd > love to help out. The two other things are things I have thought about, but I think it's beyond the scope of spec/ui. However, it's something spec/ui (and people using it) would definitely benefit from. I don't have time to take it over, but I'll keep an eye on its progress. > > Cheers, > Shane > > On 12/26/06, aslak hellesoy wrote: > > Hi all, > > > > A few weeks ago I blogged about how to get pretty RSpec/Watir HTML > > reports with screenshots > > (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir). > > > > I have taken the code and wrapped it up as a gem (still unreleased). > > If you check out the trunk you'll find it under spec_ui. > > > > There isn't a lot of documentation, but there are two examples in > > there, one for Watir/Safariwatir and one for Selenium-RC. > > > > I'd appreciate some feedback on this - I'd like to make this gem part > > of the next release. > > > > Aslak > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > -- > Shane > http://www.shaneduan.com > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From shane.duan at gmail.com Wed Dec 27 13:17:26 2006 From: shane.duan at gmail.com (Shane Duan) Date: Wed, 27 Dec 2006 10:17:26 -0800 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> Message-ID: I have an ongoing project 'buildmaster' that deals with launching the programs so it should not be hard to start selenium server. I still need to check if I can shut it down through program. As for the API, if you dig into watir code, it ends up making the selenium style calls anyway. So I don't think the wrapping will be hard, plus I did it with Selenium .NET diver already. I think I'll steal your code on taking the snapshot, if you don't mind. :) Cheers, Shane On 12/27/06, aslak hellesoy wrote: > On 12/27/06, Shane Duan wrote: > > Nice... > > > > I happen to be looking into the same thing. I registered the > > 'selenium' project on rubyforge last week with the following goal: > > > > * Wrap selenium server in ruby script so that you can start and stop > > it through ruby. Selenium server is under apache license so I don't > > think there will be problem bundling it as part of the gem. In this > > way, people can just install selenium gem and Java and can start > > writing tests right away. > > * Wrap selenium ruby driver API into watir style API because I have > > found that watir style leads to better testing code that are scalable > > and easy to maintain. > > That would be great! How easy do you think it will be? Are the APIs > mostly compatible? > > > * helper to provide screen shots. > > > > I have already done this in spec/ui. See the selenium example and the > selenium_helper.rb In fact, the screenshot stuff isn't related to the > web testing framework at all, except for the little piece of code that > grabs the HTML source. > > (My goal down the road with spec/ui is to use it for other UI testing > tools as well. Some Watir-like library for Flex would be great). > > > Is that on your plate? If so, you can take over this project and I'd > > love to help out. > > The two other things are things I have thought about, but I think it's > beyond the scope of spec/ui. However, it's something spec/ui (and > people using it) would definitely benefit from. > > I don't have time to take it over, but I'll keep an eye on its progress. > > > > > Cheers, > > Shane > > > > On 12/26/06, aslak hellesoy wrote: > > > Hi all, > > > > > > A few weeks ago I blogged about how to get pretty RSpec/Watir HTML > > > reports with screenshots > > > (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir). > > > > > > I have taken the code and wrapped it up as a gem (still unreleased). > > > If you check out the trunk you'll find it under spec_ui. > > > > > > There isn't a lot of documentation, but there are two examples in > > > there, one for Watir/Safariwatir and one for Selenium-RC. > > > > > > I'd appreciate some feedback on this - I'd like to make this gem part > > > of the next release. > > > > > > Aslak > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > -- > > Shane > > http://www.shaneduan.com > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Shane http://www.shaneduan.com From nicksieger at gmail.com Wed Dec 27 13:38:02 2006 From: nicksieger at gmail.com (Nick Sieger) Date: Wed, 27 Dec 2006 12:38:02 -0600 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> Message-ID: On 12/27/06, Shane Duan wrote: > > I have an ongoing project 'buildmaster' that deals with launching the > programs so it should not be hard to start selenium server. I still > need to check if I can shut it down through program. I've done a little bit of work in this area too with selenium RC. Here are some rake tasks that will start and stop the server: http://svn.caldersphere.net/svn/main/rspec_selenium_rc/trunk/Rakefile (Look for the :start_selenium and :stop_selenium tasks 2/3 of the way down.) Cheers, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20061227/b37ffd92/attachment.html From shane.duan at gmail.com Wed Dec 27 13:55:43 2006 From: shane.duan at gmail.com (Shane Duan) Date: Wed, 27 Dec 2006 10:55:43 -0800 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> Message-ID: NICE!!! Thanks. Shane On 12/27/06, Nick Sieger wrote: > On 12/27/06, Shane Duan wrote: > > I have an ongoing project 'buildmaster' that deals with launching the > > programs so it should not be hard to start selenium server. I still > > need to check if I can shut it down through program. > > I've done a little bit of work in this area too with selenium RC. Here are > some rake tasks that will start and stop the server: > > http://svn.caldersphere.net/svn/main/rspec_selenium_rc/trunk/Rakefile > > (Look for the :start_selenium and :stop_selenium tasks 2/3 of the way down.) > > Cheers, > /Nick > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > > -- Shane http://www.shaneduan.com From aslak.hellesoy at gmail.com Wed Dec 27 17:19:53 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Wed, 27 Dec 2006 16:19:53 -0600 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> Message-ID: <8d961d900612271419jfcb5c1fse38fa19e42e924cd@mail.gmail.com> On 12/27/06, Shane Duan wrote: > I have an ongoing project 'buildmaster' that deals with launching the > programs so it should not be hard to start selenium server. I still > need to check if I can shut it down through program. > > As for the API, if you dig into watir code, it ends up making the > selenium style calls anyway. So I don't think the wrapping will be > hard, plus I did it with Selenium .NET diver already. > > I think I'll steal your code on taking the snapshot, if you don't mind. :) > If it's for your own project - go a head - it's meant to be used. If it is to release another gem or something, I'd prefer patches to spec/ui. It's confusing for users to have too many options to do the same thing. Aslak > Cheers, > Shane > > On 12/27/06, aslak hellesoy wrote: > > On 12/27/06, Shane Duan wrote: > > > Nice... > > > > > > I happen to be looking into the same thing. I registered the > > > 'selenium' project on rubyforge last week with the following goal: > > > > > > * Wrap selenium server in ruby script so that you can start and stop > > > it through ruby. Selenium server is under apache license so I don't > > > think there will be problem bundling it as part of the gem. In this > > > way, people can just install selenium gem and Java and can start > > > writing tests right away. > > > * Wrap selenium ruby driver API into watir style API because I have > > > found that watir style leads to better testing code that are scalable > > > and easy to maintain. > > > > That would be great! How easy do you think it will be? Are the APIs > > mostly compatible? > > > > > * helper to provide screen shots. > > > > > > > I have already done this in spec/ui. See the selenium example and the > > selenium_helper.rb In fact, the screenshot stuff isn't related to the > > web testing framework at all, except for the little piece of code that > > grabs the HTML source. > > > > (My goal down the road with spec/ui is to use it for other UI testing > > tools as well. Some Watir-like library for Flex would be great). > > > > > Is that on your plate? If so, you can take over this project and I'd > > > love to help out. > > > > The two other things are things I have thought about, but I think it's > > beyond the scope of spec/ui. However, it's something spec/ui (and > > people using it) would definitely benefit from. > > > > I don't have time to take it over, but I'll keep an eye on its progress. > > > > > > > > Cheers, > > > Shane > > > > > > On 12/26/06, aslak hellesoy wrote: > > > > Hi all, > > > > > > > > A few weeks ago I blogged about how to get pretty RSpec/Watir HTML > > > > reports with screenshots > > > > (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir). > > > > > > > > I have taken the code and wrapped it up as a gem (still unreleased). > > > > If you check out the trunk you'll find it under spec_ui. > > > > > > > > There isn't a lot of documentation, but there are two examples in > > > > there, one for Watir/Safariwatir and one for Selenium-RC. > > > > > > > > I'd appreciate some feedback on this - I'd like to make this gem part > > > > of the next release. > > > > > > > > Aslak > > > > _______________________________________________ > > > > rspec-devel mailing list > > > > rspec-devel at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > > > > > > > > > -- > > > Shane > > > http://www.shaneduan.com > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > -- > Shane > http://www.shaneduan.com > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From shane.duan at gmail.com Wed Dec 27 17:27:48 2006 From: shane.duan at gmail.com (Shane Duan) Date: Wed, 27 Dec 2006 14:27:48 -0800 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: <8d961d900612271419jfcb5c1fse38fa19e42e924cd@mail.gmail.com> References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> <8d961d900612271419jfcb5c1fse38fa19e42e924cd@mail.gmail.com> Message-ID: I see. I thought it would be better to have the code related to selenium in the selenium gem. I will be busy with other stuff in the meanwhile anyway. I might never get to this part since you have already done it and I am using rspec. Cheers Shane On 12/27/06, aslak hellesoy wrote: > On 12/27/06, Shane Duan wrote: > If it's for your own project - go a head - it's meant to be used. > > If it is to release another gem or something, I'd prefer patches to > spec/ui. It's confusing for users to have too many options to do the > same thing. > > Aslak From aslak.hellesoy at gmail.com Wed Dec 27 23:15:17 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 28 Dec 2006 05:15:17 +0100 Subject: [rspec-devel] New command line options Message-ID: <8d961d900612272015x17bf0c3ct40180276d355cc9f@mail.gmail.com> I have just committed some changes to the spec command line addressing the following shortcomings: * drb-based spec running (fast-running rails specs) couldn't be used from spec/rails' rake tasks or RSpec.tmbundle * coloured or any other standard spec command line options could not be passed to spec/rails' rake tasks These shortcomings are now history. Options can now be passed to the spec command via the --options switch. The default spec/rails rake tasks now use this, so you can tweak RSpec's behaviour by editing your RSpec-enabled Rails project's spec/spec.opts file. Further, the --drb command line switch makes fast-running specs accessible both from Rake and from the RSpec.tmbundle (TextMate plugin) via the TM_RSPEC_OPTS variable. Most of this is already described in the upcoming website docs. I'm planning to publish some screencasts soon. They will cover both RSpec basics as well as some of the more advanced features that have been added recently. Cheers, Aslak From noreply at rubyforge.org Thu Dec 28 07:13:18 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 28 Dec 2006 07:13:18 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7480 ] rake spec modifies development database, not test database Message-ID: <20061228121318.37C0C5240B73@rubyforge.org> Bugs item #7480, was opened at 2006-12-28 04:13 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7480&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Steve Jorgensen (jorgens) Assigned to: Nobody (None) Summary: rake spec modifies development database, not test database Initial Comment: After I run rake spec for my application, I have fixture data in my development database. Apparently, the spec runner is no setting the rails environment to 'test'. I'm running version 0.7.5 of RSpec and of the Rails RSpec plugin. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7480&group_id=797 From noreply at rubyforge.org Thu Dec 28 09:43:51 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 28 Dec 2006 09:43:51 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7480 ] rake spec modifies development database, not test database Message-ID: <20061228144351.48BE7524122A@rubyforge.org> Bugs item #7480, was opened at 2006-12-28 07:13 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7480&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Steve Jorgensen (jorgens) >Assigned to: David Chelimsky (dchelimsky) Summary: rake spec modifies development database, not test database Initial Comment: After I run rake spec for my application, I have fixture data in my development database. Apparently, the spec runner is no setting the rails environment to 'test'. I'm running version 0.7.5 of RSpec and of the Rails RSpec plugin. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-28 09:43 Message: Dupe of http://rubyforge.org/tracker/index.php?func=detail&aid=7406&group_id=797&atid=3151 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7480&group_id=797 From aslak.hellesoy at gmail.com Thu Dec 28 12:05:23 2006 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 28 Dec 2006 18:05:23 +0100 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> <8d961d900612270537s41dbe238rf483d0385aeebdac@mail.gmail.com> <8d961d900612271419jfcb5c1fse38fa19e42e924cd@mail.gmail.com> Message-ID: <8d961d900612280905v78e08862r9b79665cfcd00d5a@mail.gmail.com> On 12/27/06, Shane Duan wrote: > I see. I thought it would be better to have the code related to > selenium in the selenium gem. > The only Selenium-related code in spec/ui is selenium_helper.rb, which is just monkey patching Selenium::SeleniumDriver to make it work with the rest of spec/ui. I doubt this code would be useful outside spec/ui. The screenshot-related code is completely decoupled from Selenium and is being used by the Watir example as well. In fact, the screenshot stuff can be used in conjunction with *any* Ruby-based UI testing library - all it does is to provide some convenience methods for screenshot capturing that can be called from a spec's teardown block. Aslak > I will be busy with other stuff in the meanwhile anyway. I might > never get to this part since you have already done it and I am using > rspec. > > Cheers > Shane > > On 12/27/06, aslak hellesoy wrote: > > On 12/27/06, Shane Duan wrote: > > If it's for your own project - go a head - it's meant to be used. > > > > If it is to release another gem or something, I'd prefer patches to > > spec/ui. It's confusing for users to have too many options to do the > > same thing. > > > > Aslak > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From noreply at rubyforge.org Thu Dec 28 13:48:49 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 28 Dec 2006 13:48:49 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-6098 ] Make scaffold_resource generator Message-ID: <20061228184849.17CFC5241559@rubyforge.org> Feature Requests item #6098, was opened at 2006-10-11 06:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6098&group_id=797 Category: rails plugin Group: None >Status: Closed Priority: 3 Submitted By: Aslak Helles?y (aslak_hellesoy) Assigned to: Aslak Helles?y (aslak_hellesoy) Summary: Make scaffold_resource generator Initial Comment: In the new RESTful Rails it's better to use the scaffold_resource generator. We should support it too. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-28 13:48 Message: Automated testing is now in place (as of r1347). It is enabled only for Rails 1.2.0 and edge, as it won't work on 1.1.6. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-27 21:48 Message: This is in the trunk now (as of rev 1160) but I'm not closing this because it's not yet tested in an automated way. ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-26 15:18 Message: Luckliy I happened to have a copy of the code locally before the svn disappeared. I have attached it. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-11-24 20:30 Message: Hey Pat - I went to http://svn.flpr.org/public/plugins/rspec_resource_generator to grab the latest source and couldn't get to it (can't even ping flpr.org). Would you mind posting a new link to it, or just attaching a patch to this ticket? I'd like to get this in soon. Thanks, David ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-09 11:54 Message: I think the routing patch should be applied separately in spec/rails. We have to make it work with both 1.1.6 and Edge Rails. This brings up another issue - our build system needs to be able to run all spec/rails specs several times, typically once for the latest Rails release and once for edge. -Possibly with a mechanism to differentiate what's being run depending on the Rails version. I think the most pragmatic way to verify that this (and other generators) is working is to have the rake script (bootstrap_rspec.rake) execute the various generators before specs are run. And then delete the generated files afterwards (or maybe right before they're generated). This would require that we change the templates - right now they fail on purpose with "not enough specs". We should be able to generate stuff and have all specs pass. If you could help with any of this it would be fabulous! ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-09 11:35 Message: I applied the patch. Sorry about the routing method error...I completely forgot I had that in there. I saw your comment in http://rubyforge.org/tracker/?func=detail&atid=3151&aid=6471&group_id=797 that it doesn't work in 1.1.6. What would you like me to do for this plugin? Should I move the routing method into the plugin itself? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-09 09:17 Message: I'm attaching a patch with some small improvements: should_eql and correct use of controller_class_name ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-09 08:41 Message: Looks like routing is defined in this "patch": http://rubyforge.org/tracker/index.php?func=detail&aid=6471&group_id=797&atid=3152 ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-09 08:34 Message: I tried this with RSpec's demo app (vendor/rspec_on_rails) - I created an account resource. The following code is failing: NoMethodError in 'The accountsController should map { :controller => 'accounts', :action => 'show', :id => 1 } to /accounts/1' undefined method `routing' for #<#:0x3b2d680> Where is this routing method defined? ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-11-04 11:49 Message: My plugin at http://svn.flpr.org/public/plugins/rspec_resource_generator/ handles that. I removed the forked code, so the only template now is the controller_spec. Everything else is pulled from the standard Rails generators, and the rspec_model generator for the model spec. Anything else that should be done with that? ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-11-04 04:28 Message: We should *not* fork/copy Rails code. Reuse all the existing templates, swap the test generation with spec generation (our own template). See the implementation of rspec_model and rspec_controller generators. ---------------------------------------------------------------------- Comment By: Jeff Dean (jefdean) Date: 2006-10-30 03:09 Message: I've written an rspec_scaffold_resource generator and I'm just waiting to here back on a few questions about directory changes in trunk before submitting the patch - Jeff Dean ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6098&group_id=797 From noreply at rubyforge.org Thu Dec 28 15:29:55 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 28 Dec 2006 15:29:55 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run. Message-ID: <20061228202956.002EE5241905@rubyforge.org> Bugs item #7409, was opened at 2006-12-21 07:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: default fixtures do not appear to run. Initial Comment: when I insert my default fixtures into the spec helper... "Nothing Happens" and all tests fail. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-28 20:29 Message: Can we see the full text of your spec_helper please? ---------------------------------------------------------------------- Comment By: Dallas Pool (codeninja) Date: 2006-12-21 17:43 Message: This line (ENV["RAILS_ENV"] = "test") is currently in the top of my spec_helper.rb and I snagged the plugin directly from trunk 2 days ago. The problem persists. Please advise. Thanks. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 12:50 Message: Please add the following to the top of spec_helper and tell us if you still experience the problem: ENV["RAILS_ENV"] = "test" This was errantly removed from spec_helper. It has now been replaced (in trunk), so if that solves your problem we can close this ticket. Thanks ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 From noreply at rubyforge.org Thu Dec 28 16:21:52 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 28 Dec 2006 16:21:52 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run. Message-ID: <20061228212153.059815241931@rubyforge.org> Bugs item #7409, was opened at 2006-12-21 02:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dallas Pool (codeninja) Assigned to: Nobody (None) Summary: default fixtures do not appear to run. Initial Comment: when I insert my default fixtures into the spec helper... "Nothing Happens" and all tests fail. ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-28 16:21 Message: We can reproduce it in the spec/rails demo app as follows: 1) comment out "fixtures :people, :animals" in person_spec.rb 2) put "fxtures :people, :animals" in spec_helper.rb 3) ruby -I../rspec/lib spec/models/person_spec.rb See the specs fail ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-28 15:29 Message: Can we see the full text of your spec_helper please? ---------------------------------------------------------------------- Comment By: Dallas Pool (codeninja) Date: 2006-12-21 12:43 Message: This line (ENV["RAILS_ENV"] = "test") is currently in the top of my spec_helper.rb and I snagged the plugin directly from trunk 2 days ago. The problem persists. Please advise. Thanks. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-21 07:50 Message: Please add the following to the top of spec_helper and tell us if you still experience the problem: ENV["RAILS_ENV"] = "test" This was errantly removed from spec_helper. It has now been replaced (in trunk), so if that solves your problem we can close this ticket. Thanks ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7409&group_id=797 From noreply at rubyforge.org Fri Dec 29 15:15:11 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 29 Dec 2006 15:15:11 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7494 ] controller.should_redirect_to doesn't support arguments Message-ID: <20061229201511.C5599524160A@rubyforge.org> Bugs item #7494, was opened at 2006-12-29 15:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7494&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Chris Hoffman (hoffman_c) Assigned to: Nobody (None) Summary: controller.should_redirect_to doesn't support arguments Initial Comment: For example, the following fails: controller.should_redirect_to(:action => 'new').with(:name => 'Chris') ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7494&group_id=797 From noreply at rubyforge.org Fri Dec 29 15:56:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 29 Dec 2006 15:56:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7494 ] controller.should_redirect_to doesn't support arguments Message-ID: <20061229205658.E419D524162A@rubyforge.org> Feature Requests item #7494, was opened at 2006-12-29 20:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7494&group_id=797 >Category: None Group: None Status: Open Priority: 3 Submitted By: Chris Hoffman (hoffman_c) Assigned to: Nobody (None) Summary: controller.should_redirect_to doesn't support arguments Initial Comment: For example, the following fails: controller.should_redirect_to(:action => 'new').with(:name => 'Chris') ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7494&group_id=797 From noreply at rubyforge.org Fri Dec 29 16:03:39 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 29 Dec 2006 16:03:39 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7494 ] controller.should_redirect_to doesn't support arguments Message-ID: <20061229210339.B78FF5241631@rubyforge.org> Feature Requests item #7494, was opened at 2006-12-29 20:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7494&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Chris Hoffman (hoffman_c) Assigned to: Nobody (None) Summary: controller.should_redirect_to doesn't support arguments Initial Comment: For example, the following fails: controller.should_redirect_to(:action => 'new').with(:name => 'Chris') ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-29 21:03 Message: should_redirect_to will take a Hash or a String. Have you tried this? controller.should_redirect_to(:action => 'new', :name => 'Chris') ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7494&group_id=797 From noreply at rubyforge.org Fri Dec 29 19:07:28 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 29 Dec 2006 19:07:28 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7494 ] controller.should_redirect_to doesn't support arguments Message-ID: <20061230000728.20EDE524187B@rubyforge.org> Feature Requests item #7494, was opened at 2006-12-29 15:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7494&group_id=797 Category: None Group: None >Status: Closed Priority: 3 Submitted By: Chris Hoffman (hoffman_c) Assigned to: Nobody (None) Summary: controller.should_redirect_to doesn't support arguments Initial Comment: For example, the following fails: controller.should_redirect_to(:action => 'new').with(:name => 'Chris') ---------------------------------------------------------------------- >Comment By: Chris Hoffman (hoffman_c) Date: 2006-12-29 19:07 Message: Oh, I guess that makes sense. I tried that before and it didn't work, but it must have been a syntax error, as it is working fine now. Thanks. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-29 16:03 Message: should_redirect_to will take a Hash or a String. Have you tried this? controller.should_redirect_to(:action => 'new', :name => 'Chris') ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7494&group_id=797 From noreply at rubyforge.org Fri Dec 29 22:22:37 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 29 Dec 2006 22:22:37 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7496 ] Need a way to freeze the RSpec gem in a rails project Message-ID: <20061230032237.9C1DB5241B77@rubyforge.org> Feature Requests item #7496, was opened at 2006-12-29 19:22 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7496&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: Steve Jorgensen (jorgens) Assigned to: Nobody (None) Summary: Need a way to freeze the RSpec gem in a rails project Initial Comment: The freeze_other_gems task doesn't work with RSpec, and my host doesn't have the RSpec gem installed. Therefore, when I upload my application, I can't run -any- rake tasks until I delete the rspec_on_rails_plugin. Needless to say, I can't then run my specs on the host server. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7496&group_id=797 From noreply at rubyforge.org Sat Dec 30 00:54:16 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 30 Dec 2006 00:54:16 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7461 ] [PATCH] Contexts don't call Module::included when they include a module Message-ID: <20061230055416.DAFEA5241BAA@rubyforge.org> Patches item #7461, was opened at 2006-12-26 16:41 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: [PATCH] Contexts don't call Module::included when they include a module Initial Comment: module MyModule module ClassMethods def foo "foo" end end def self.included(receiver) receiver.extend ClassMethods end end context "Test context" do include MyModule foo end blows up because foo isn't defined. It turns out that the included method isn't being called at all. Now regardless of whether you think it's okay to use included like this to automatically extend a class, or you think that you should explicitly extend a class instead, Contexts shouldn't break Ruby's included callback method. This patch fixes it up. It just adds mod.send :included, self to Context and ContextEval. I included a spec for it, but it comes with a warning. The "mod.send" line is required in Context for the spec to pass. But if you just use that in code, then the code will fail. You have to have "mod.send" in ContextEval as well. However, the spec doesn't fail if you don't call it in ContextEval. So basically, the call in ContextEval is necessary for the desired behavior, but isn't covered by a spec. I haven't been able to come up with a failing spec for it...so hopefully someone who knows the RSpec internals better than I can come up with it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-30 05:54 Message: How do you know that this doesn't work without mod.send in ContextEval? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 From noreply at rubyforge.org Sat Dec 30 01:01:46 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 30 Dec 2006 01:01:46 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7461 ] [PATCH] Contexts don't call Module::included when they include a module Message-ID: <20061230060146.8A7B65241BAA@rubyforge.org> Patches item #7461, was opened at 2006-12-26 09:41 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: [PATCH] Contexts don't call Module::included when they include a module Initial Comment: module MyModule module ClassMethods def foo "foo" end end def self.included(receiver) receiver.extend ClassMethods end end context "Test context" do include MyModule foo end blows up because foo isn't defined. It turns out that the included method isn't being called at all. Now regardless of whether you think it's okay to use included like this to automatically extend a class, or you think that you should explicitly extend a class instead, Contexts shouldn't break Ruby's included callback method. This patch fixes it up. It just adds mod.send :included, self to Context and ContextEval. I included a spec for it, but it comes with a warning. The "mod.send" line is required in Context for the spec to pass. But if you just use that in code, then the code will fail. You have to have "mod.send" in ContextEval as well. However, the spec doesn't fail if you don't call it in ContextEval. So basically, the call in ContextEval is necessary for the desired behavior, but isn't covered by a spec. I haven't been able to come up with a failing spec for it...so hopefully someone who knows the RSpec internals better than I can come up with it. ---------------------------------------------------------------------- >Comment By: Pat Maddox (pergesu) Date: 2006-12-29 23:01 Message: I wrote the failing spec and implemented the code, which didn't require ContextEval. Then I used that in my project, and it didn't work. The error was an undefined method on a ContextEval instance. I then added the send to ContextEval, and it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-29 22:54 Message: How do you know that this doesn't work without mod.send in ContextEval? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 From noreply at rubyforge.org Sat Dec 30 01:11:00 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 30 Dec 2006 01:11:00 -0500 (EST) Subject: [rspec-devel] [ rspec-Patches-7461 ] [PATCH] Contexts don't call Module::included when they include a module Message-ID: <20061230061101.B1E935241BAA@rubyforge.org> Patches item #7461, was opened at 2006-12-26 16:41 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Pat Maddox (pergesu) Assigned to: Nobody (None) Summary: [PATCH] Contexts don't call Module::included when they include a module Initial Comment: module MyModule module ClassMethods def foo "foo" end end def self.included(receiver) receiver.extend ClassMethods end end context "Test context" do include MyModule foo end blows up because foo isn't defined. It turns out that the included method isn't being called at all. Now regardless of whether you think it's okay to use included like this to automatically extend a class, or you think that you should explicitly extend a class instead, Contexts shouldn't break Ruby's included callback method. This patch fixes it up. It just adds mod.send :included, self to Context and ContextEval. I included a spec for it, but it comes with a warning. The "mod.send" line is required in Context for the spec to pass. But if you just use that in code, then the code will fail. You have to have "mod.send" in ContextEval as well. However, the spec doesn't fail if you don't call it in ContextEval. So basically, the call in ContextEval is necessary for the desired behavior, but isn't covered by a spec. I haven't been able to come up with a failing spec for it...so hopefully someone who knows the RSpec internals better than I can come up with it. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-30 06:11 Message: That makes sense. It also leads me to believe that there should be a way to create a spec that fails without the line in ContextEval. Can you share a spec and code that only works if the line exists in ContextEval? That might help come up w/ a spec for it. ---------------------------------------------------------------------- Comment By: Pat Maddox (pergesu) Date: 2006-12-30 06:01 Message: I wrote the failing spec and implemented the code, which didn't require ContextEval. Then I used that in my project, and it didn't work. The error was an undefined method on a ContextEval instance. I then added the send to ContextEval, and it worked fine. ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-30 05:54 Message: How do you know that this doesn't work without mod.send in ContextEval? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3151&aid=7461&group_id=797 From noreply at rubyforge.org Sat Dec 30 23:24:20 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 30 Dec 2006 23:24:20 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7507 ] "render..and return" doesn't return Message-ID: <20061231042420.4980052419BA@rubyforge.org> Bugs item #7507, was opened at 2006-12-31 04:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: courtenay 3 (court3nay) Assigned to: Nobody (None) Summary: "render..and return" doesn't return Initial Comment: In a controller, def index if stuff redirect_to :stuff and return end end raises a DoubleRender error. This is a commonly-used rails syntax. Changing 'and' to a semicolon or newline removes the error. Adding parenthesis to redirect_to() doesn't help. {{{ 2) ActionController::DoubleRenderError in 'The Carts controller with an existing User should add items to the cart' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb:92:in `create' spec/controllers/carts_controller_spec.rb:99: spec/controllers/carts_controller_spec.rb:118: }}} ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 From noreply at rubyforge.org Sun Dec 31 04:20:04 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 04:20:04 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7509 ] rcov/rspec incorrectly includes boot.rb Message-ID: <20061231092004.A7B465241BE5@rubyforge.org> Bugs item #7509, was opened at 2006-12-31 09:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7509&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: courtenay 3 (court3nay) Assigned to: Nobody (None) Summary: rcov/rspec incorrectly includes boot.rb Initial Comment: ..which skews the results, since boot.rb is all about loading rails and is about 43% "covered" (if you're running on Rails gems) File lib/spec/rake/spectask.rb Line 93 - @rcov_opts = ['--exclude', 'lib\/spec,bin\/spec'] + @rcov_opts = ['--exclude', 'lib\/spec,bin\/spec,config/boot.rb'] I'm not sure if this is the right place for this piece of code. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7509&group_id=797 From noreply at rubyforge.org Sun Dec 31 06:01:58 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 06:01:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7509 ] rcov/rspec incorrectly includes boot.rb Message-ID: <20061231110158.34F1F5240D10@rubyforge.org> Bugs item #7509, was opened at 2006-12-31 09:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7509&group_id=797 >Category: expectation module Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: courtenay 3 (court3nay) >Assigned to: David Chelimsky (dchelimsky) Summary: rcov/rspec incorrectly includes boot.rb Initial Comment: ..which skews the results, since boot.rb is all about loading rails and is about 43% "covered" (if you're running on Rails gems) File lib/spec/rake/spectask.rb Line 93 - @rcov_opts = ['--exclude', 'lib\/spec,bin\/spec'] + @rcov_opts = ['--exclude', 'lib\/spec,bin\/spec,config/boot.rb'] I'm not sure if this is the right place for this piece of code. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 11:01 Message: Fixed in trunk (rev 1352) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7509&group_id=797 From noreply at rubyforge.org Sun Dec 31 07:03:02 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 07:03:02 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7507 ] "render..and return" doesn't return Message-ID: <20061231120302.604415240DE5@rubyforge.org> Bugs item #7507, was opened at 2006-12-31 04:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: courtenay 3 (court3nay) >Assigned to: David Chelimsky (dchelimsky) >Summary: "render..and return" doesn't return Initial Comment: In a controller, def index if stuff redirect_to :stuff and return end end raises a DoubleRender error. This is a commonly-used rails syntax. Changing 'and' to a semicolon or newline removes the error. Adding parenthesis to redirect_to() doesn't help. {{{ 2) ActionController::DoubleRenderError in 'The Carts controller with an existing User should add items to the cart' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb:92:in `create' spec/controllers/carts_controller_spec.rb:99: spec/controllers/carts_controller_spec.rb:118: }}} ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 12:03 Message: I added the following spec: specify "redirected to another action (with 'and return')" do controller.should_redirect_to :action => 'somewhere' get 'action_with_redirect_to_somewhere_and_return' end which invokes the following action: def action_with_redirect_to_somewhere_and_return redirect_to :action => 'somewhere' and return end And it passes (against rails 1.1.6, 1.2.0-RC1 and edge) Perhaps you're on an older version of rspec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 From noreply at rubyforge.org Sun Dec 31 11:18:06 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 11:18:06 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7507 ] " render..and return" doesn't return Message-ID: <20061231161806.44D855241067@rubyforge.org> Bugs item #7507, was opened at 2006-12-31 04:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 Category: rails plugin Group: None Status: Closed Resolution: Rejected Priority: 3 Submitted By: courtenay 3 (court3nay) Assigned to: David Chelimsky (dchelimsky) >Summary: "render..and return" doesn't return Initial Comment: In a controller, def index if stuff redirect_to :stuff and return end end raises a DoubleRender error. This is a commonly-used rails syntax. Changing 'and' to a semicolon or newline removes the error. Adding parenthesis to redirect_to() doesn't help. {{{ 2) ActionController::DoubleRenderError in 'The Carts controller with an existing User should add items to the cart' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb:92:in `create' spec/controllers/carts_controller_spec.rb:99: spec/controllers/carts_controller_spec.rb:118: }}} ---------------------------------------------------------------------- >Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:18 Message: The key with this bug is that DoubleRender error occurs only when you render *twice*. Hence: specify "should render checkout" do cart = mock('cart') Cart.should_receive(:find).with(1).and_return(cart) cart.should_receive(:save).and_return(true) get :checkout, :id => 1 response.should_be_redirect end ====== def checkout if cart = Cart.find(params[:id]) and cart.save redirect_to :action => 'billing' and return end # note the slightly faulty logic here, but this is a simplified case redirect_to :action => 'complete' end =========== on rails 1.2.0-RC1 and rspec 0.7.5 returns 1) ActionController::DoubleRenderError in 'The cart controller, adding items to the cart should render checkout' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb: 109:in `checkout' spec/controllers/carts_controller_spec.rb:120: spec/controllers/carts_controller_spec.rb:144: ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 12:03 Message: I added the following spec: specify "redirected to another action (with 'and return')" do controller.should_redirect_to :action => 'somewhere' get 'action_with_redirect_to_somewhere_and_return' end which invokes the following action: def action_with_redirect_to_somewhere_and_return redirect_to :action => 'somewhere' and return end And it passes (against rails 1.1.6, 1.2.0-RC1 and edge) Perhaps you're on an older version of rspec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 From noreply at rubyforge.org Sun Dec 31 11:24:27 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 11:24:27 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7507 ] & quot; render..and return& quot; doesn't return Message-ID: <20061231162427.1C96C5241067@rubyforge.org> Bugs item #7507, was opened at 2006-12-31 04:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 Category: rails plugin Group: None >Status: Open Resolution: Rejected Priority: 3 Submitted By: courtenay 3 (court3nay) Assigned to: David Chelimsky (dchelimsky) >Summary: &quot;render..and return&quot; doesn't return Initial Comment: In a controller, def index if stuff redirect_to :stuff and return end end raises a DoubleRender error. This is a commonly-used rails syntax. Changing 'and' to a semicolon or newline removes the error. Adding parenthesis to redirect_to() doesn't help. {{{ 2) ActionController::DoubleRenderError in 'The Carts controller with an existing User should add items to the cart' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb:92:in `create' spec/controllers/carts_controller_spec.rb:99: spec/controllers/carts_controller_spec.rb:118: }}} ---------------------------------------------------------------------- >Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:24 Message: I just found this seems to be a duplicate of [#6959] Calls to render and redirect in controllers should return true Which was Fixed in trunk (rev 1183). However the plugin I'm using is 0.7.5 which svn tells me is from svn:// rubyforge.org/var/svn/rspec/tags/REL_0_7_5/rspec_on_rails/vendor/ plugins/rspec_on_rails So, a regression? ---------------------------------------------------------------------- Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:18 Message: The key with this bug is that DoubleRender error occurs only when you render *twice*. Hence: specify "should render checkout" do cart = mock('cart') Cart.should_receive(:find).with(1).and_return(cart) cart.should_receive(:save).and_return(true) get :checkout, :id => 1 response.should_be_redirect end ====== def checkout if cart = Cart.find(params[:id]) and cart.save redirect_to :action => 'billing' and return end # note the slightly faulty logic here, but this is a simplified case redirect_to :action => 'complete' end =========== on rails 1.2.0-RC1 and rspec 0.7.5 returns 1) ActionController::DoubleRenderError in 'The cart controller, adding items to the cart should render checkout' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb: 109:in `checkout' spec/controllers/carts_controller_spec.rb:120: spec/controllers/carts_controller_spec.rb:144: ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 12:03 Message: I added the following spec: specify "redirected to another action (with 'and return')" do controller.should_redirect_to :action => 'somewhere' get 'action_with_redirect_to_somewhere_and_return' end which invokes the following action: def action_with_redirect_to_somewhere_and_return redirect_to :action => 'somewhere' and return end And it passes (against rails 1.1.6, 1.2.0-RC1 and edge) Perhaps you're on an older version of rspec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 From noreply at rubyforge.org Sun Dec 31 12:04:42 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 12:04:42 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7507 ] & quot; render..and return& quot; doesn't return Message-ID: <20061231170442.339A7524110B@rubyforge.org> Bugs item #7507, was opened at 2006-12-31 04:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 Category: rails plugin Group: None Status: Open Resolution: Rejected Priority: 3 Submitted By: courtenay 3 (court3nay) Assigned to: David Chelimsky (dchelimsky) Summary: &quot;render..and return&quot; doesn't return Initial Comment: In a controller, def index if stuff redirect_to :stuff and return end end raises a DoubleRender error. This is a commonly-used rails syntax. Changing 'and' to a semicolon or newline removes the error. Adding parenthesis to redirect_to() doesn't help. {{{ 2) ActionController::DoubleRenderError in 'The Carts controller with an existing User should add items to the cart' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb:92:in `create' spec/controllers/carts_controller_spec.rb:99: spec/controllers/carts_controller_spec.rb:118: }}} ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 17:04 Message: Not a regression, as it works like this: redirect_to :somewhere return render :text => "some text" but fails like this: redirect_to :somewhere and return render :text => "some text" Separate issue from before. I do have a failing spec now, so we're 1/2 way there. Thanks, David ---------------------------------------------------------------------- Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:24 Message: I just found this seems to be a duplicate of [#6959] Calls to render and redirect in controllers should return true Which was Fixed in trunk (rev 1183). However the plugin I'm using is 0.7.5 which svn tells me is from svn:// rubyforge.org/var/svn/rspec/tags/REL_0_7_5/rspec_on_rails/vendor/ plugins/rspec_on_rails So, a regression? ---------------------------------------------------------------------- Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:18 Message: The key with this bug is that DoubleRender error occurs only when you render *twice*. Hence: specify "should render checkout" do cart = mock('cart') Cart.should_receive(:find).with(1).and_return(cart) cart.should_receive(:save).and_return(true) get :checkout, :id => 1 response.should_be_redirect end ====== def checkout if cart = Cart.find(params[:id]) and cart.save redirect_to :action => 'billing' and return end # note the slightly faulty logic here, but this is a simplified case redirect_to :action => 'complete' end =========== on rails 1.2.0-RC1 and rspec 0.7.5 returns 1) ActionController::DoubleRenderError in 'The cart controller, adding items to the cart should render checkout' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb: 109:in `checkout' spec/controllers/carts_controller_spec.rb:120: spec/controllers/carts_controller_spec.rb:144: ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 12:03 Message: I added the following spec: specify "redirected to another action (with 'and return')" do controller.should_redirect_to :action => 'somewhere' get 'action_with_redirect_to_somewhere_and_return' end which invokes the following action: def action_with_redirect_to_somewhere_and_return redirect_to :action => 'somewhere' and return end And it passes (against rails 1.1.6, 1.2.0-RC1 and edge) Perhaps you're on an older version of rspec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 From noreply at rubyforge.org Sun Dec 31 15:13:39 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 31 Dec 2006 15:13:39 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7507 ] & quot; render..and return& quot; doesn't return Message-ID: <20061231201339.3B98252413CC@rubyforge.org> Bugs item #7507, was opened at 2006-12-31 04:24 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797 Category: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: courtenay 3 (court3nay) Assigned to: David Chelimsky (dchelimsky) Summary: &quot;render..and return&quot; doesn't return Initial Comment: In a controller, def index if stuff redirect_to :stuff and return end end raises a DoubleRender error. This is a commonly-used rails syntax. Changing 'and' to a semicolon or newline removes the error. Adding parenthesis to redirect_to() doesn't help. {{{ 2) ActionController::DoubleRenderError in 'The Carts controller with an existing User should add items to the cart' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb:92:in `create' spec/controllers/carts_controller_spec.rb:99: spec/controllers/carts_controller_spec.rb:118: }}} ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 20:13 Message: Fixed in trunk (rev 1354) ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 17:04 Message: Not a regression, as it works like this: redirect_to :somewhere return render :text => "some text" but fails like this: redirect_to :somewhere and return render :text => "some text" Separate issue from before. I do have a failing spec now, so we're 1/2 way there. Thanks, David ---------------------------------------------------------------------- Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:24 Message: I just found this seems to be a duplicate of [#6959] Calls to render and redirect in controllers should return true Which was Fixed in trunk (rev 1183). However the plugin I'm using is 0.7.5 which svn tells me is from svn:// rubyforge.org/var/svn/rspec/tags/REL_0_7_5/rspec_on_rails/vendor/ plugins/rspec_on_rails So, a regression? ---------------------------------------------------------------------- Comment By: courtenay 3 (court3nay) Date: 2006-12-31 16:18 Message: The key with this bug is that DoubleRender error occurs only when you render *twice*. Hence: specify "should render checkout" do cart = mock('cart') Cart.should_receive(:find).with(1).and_return(cart) cart.should_receive(:save).and_return(true) get :checkout, :id => 1 response.should_be_redirect end ====== def checkout if cart = Cart.find(params[:id]) and cart.save redirect_to :action => 'billing' and return end # note the slightly faulty logic here, but this is a simplified case redirect_to :action => 'complete' end =========== on rails 1.2.0-RC1 and rspec 0.7.5 returns 1) ActionController::DoubleRenderError in 'The cart controller, adding items to the cart should render checkout' Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and only once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". Finally, note that to cause a before filter to halt execution of the rest of the filter chain, the filter must return false, explicitly, so "render(...) and return false". /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/ context/controller.rb:82:in `redirect_to' /disk0s3/rails/store/trunk/config/../app/controllers/carts_controller.rb: 109:in `checkout' spec/controllers/carts_controller_spec.rb:120: spec/controllers/carts_controller_spec.rb:144: ---------------------------------------------------------------------- Comment By: David Chelimsky (dchelimsky) Date: 2006-12-31 12:03 Message: I added the following spec: specify "redirected to another action (with 'and return')" do controller.should_redirect_to :action => 'somewhere' get 'action_with_redirect_to_somewhere_and_return' end which invokes the following action: def action_with_redirect_to_somewhere_and_return redirect_to :action => 'somewhere' and return end And it passes (against rails 1.1.6, 1.2.0-RC1 and edge) Perhaps you're on an older version of rspec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7507&group_id=797