From aslak.hellesoy at gmail.com Mon Jan 1 22:38:32 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 2 Jan 2007 04:38:32 +0100 Subject: [rspec-devel] DB changes Message-ID: <8d961d900701011938h2fac7a95gefa4752d067be5f9@mail.gmail.com> I'v done some changes to the 001 migration, so a manual rake migrate VERSION=0 is required for everyone who's building rspec. Aslak From nicksieger at gmail.com Tue Jan 2 00:42:12 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Mon, 1 Jan 2007 23:42:12 -0600 Subject: [rspec-devel] Feedback on article Message-ID: Hi, I wrote an article [1] outlining some tricks I've developed adding custom extensions into RSpec. But they all hinge upon Spec::Runner::Context#before_context_eval and the @context_eval_module ivar. So I was wondering whether this mechanism can be relied on in the future, or whether this is even the best way to wire in such extensions. If you have a recommended way I'd love to hear about it so I can incorporate it into my article and make sure I don't highlight the wrong way of doing things. Thanks and happy new year! /Nick [1]: http://blog.nicksieger.com/articles/2007/01/02/customizing-rspec -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070101/52db9e96/attachment.html From aslak.hellesoy at gmail.com Tue Jan 2 00:47:14 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 2 Jan 2007 06:47:14 +0100 Subject: [rspec-devel] New Gem: spec/ui In-Reply-To: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> References: <8d961d900612262035t64bdf551kfb9cfe5ebb8faf09@mail.gmail.com> Message-ID: <8d961d900701012147o3bfcf293wcf5169c3077bfaea@mail.gmail.com> On 12/27/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. > I have added a new Rake task to spec/rails: spec:watir This task will run specs under spec/watir and generate HTML reports with screenshots in doc/spec/watir. (If you're on Windows you need RMagick and win32screenshot installed). Specs in the spec/watir directory will have to follow a certain style, and there is an example checked in under spec/watir/person_spec.rb. I'm planning to add generator support for this such that the (new) rspec_resource generator will also generate a skeleton watir spec. A couple of things need more work: 1) Make this work with fixtures. This will require some work in spec/ui's webapp_helper.rb - it uses inherit, which conflicts with spec/rails, which also uses inherit. We can't inherit from both Test::Unit::TestCase and Spec::Ui::WebappHelper. 2) Create spec:selenium and spec:selenium_server tasks in a selenium.rake file Aslak > Aslak > From noreply at rubyforge.org Tue Jan 2 02:34:04 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 02:34:04 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7524 ] Incorrect Documentation for 'pattern' in Rake task Message-ID: <20070102073404.536815241C8D@rubyforge.org> Bugs item #7524, was opened at 2007-01-02 07:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7524&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Stephen Duncan (jrduncans) Assigned to: Nobody (None) Summary: Incorrect Documentation for 'pattern' in Rake task Initial Comment: The documentation for the rake task states that the default pattern is 'spec/spec*.rb' but is, in fact, 'spec/**/*_spec.rb'. Patch is attached. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7524&group_id=797 From noreply at rubyforge.org Tue Jan 2 07:38:42 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 07:38:42 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7409 ] default fixtures do not appear to run. Message-ID: <20070102123842.B1DE95241158@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: rails plugin Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Dallas Pool (codeninja) >Assigned to: David Chelimsky (dchelimsky) 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: 2007-01-02 12:38 Message: Fixed in trunk (rev 1358). I added a slightly different mechanism for global fixtures. In spec_helper.rb, you have to add a line to Spec::Rails::EvalContext self.global_fixtures = :table_a, :table_b, :etc ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2006-12-28 21: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 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 Tue Jan 2 07:46:21 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 07:46:21 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7524 ] Incorrect Documentation for 'pattern' in Rake task Message-ID: <20070102124621.F2ECC524113E@rubyforge.org> Bugs item #7524, was opened at 2007-01-02 02:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7524&group_id=797 >Category: expectation module Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Stephen Duncan (jrduncans) >Assigned to: David Chelimsky (dchelimsky) Summary: Incorrect Documentation for 'pattern' in Rake task Initial Comment: The documentation for the rake task states that the default pattern is 'spec/spec*.rb' but is, in fact, 'spec/**/*_spec.rb'. Patch is attached. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-01-02 07:46 Message: Applied in trunk (rev 1359). In the future, please use .patch or .diff as the file extension. Makes it easier to download as a file (some browsers tend to want to show you .txt files rather than download them). Thanks ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7524&group_id=797 From aslak.hellesoy at gmail.com Tue Jan 2 11:29:45 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 2 Jan 2007 17:29:45 +0100 Subject: [rspec-devel] Feedback on article In-Reply-To: References: Message-ID: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> On 1/2/07, Nick Sieger wrote: > Hi, I wrote an article [1] outlining some tricks I've developed adding > custom extensions into RSpec. But they all hinge upon > Spec::Runner::Context#before_context_eval and the > @context_eval_module ivar. So I was wondering whether this mechanism can be > relied on in the future, or whether this is even the best way to wire in > such extensions. If you have a recommended way I'd love to hear about it so > I can incorporate it into my article and make sure I don't highlight the > wrong way of doing things. > That's a great explenation of some of the hardest-to-understand corners of RSpec. Thanks a lot for writing it! It's very pedagogic. Regarding the stability of the API - I'm a little worried about having extensions use private variables. I think it would be better to pass the module to the method: before_context_eval(context_eval_module) A second point is monkey patching. I'm not convinced it's the best way to do things - it makes things tricky when you want to tweak things more than once (see my mail from yesterday - I want to mix the screenshot stuff with fixtures). I haven't thought of an alternative way yet, but I think we need to be able to register "extension" blocks somehow. Aslak > Thanks and happy new year! > > /Nick > > [1]: > http://blog.nicksieger.com/articles/2007/01/02/customizing-rspec > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > > From nicksieger at gmail.com Tue Jan 2 11:34:37 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Tue, 2 Jan 2007 10:34:37 -0600 Subject: [rspec-devel] Feedback on article In-Reply-To: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> References: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> Message-ID: On 1/2/07, aslak hellesoy wrote: > > On 1/2/07, Nick Sieger wrote: > > Hi, I wrote an article [1] outlining some tricks I've developed adding > > custom extensions into RSpec. But they all hinge upon > > Spec::Runner::Context#before_context_eval and the > > @context_eval_module ivar. So I was wondering whether this mechanism > can be > > relied on in the future, or whether this is even the best way to wire in > > such extensions. If you have a recommended way I'd love to hear about > it so > > I can incorporate it into my article and make sure I don't highlight the > > wrong way of doing things. > > > > Regarding the stability of the API - I'm a little worried about having > extensions use private variables. Agreed. I was still motivated to post, but I suspected you would think that about the monkeypatching and the direct use of the ivar. I think I'll put a small disclaimer at the top of the post, and keep it up to date to follow whatever you guys think would be appropriate for an extension point API. /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070102/8326a6af/attachment.html From aslak.hellesoy at gmail.com Tue Jan 2 12:15:49 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 2 Jan 2007 18:15:49 +0100 Subject: [rspec-devel] Feedback on article In-Reply-To: References: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> Message-ID: <8d961d900701020915u18f430dfv21ae731f65dee7a0@mail.gmail.com> On 1/2/07, Nick Sieger wrote: > On 1/2/07, aslak hellesoy wrote: > > On 1/2/07, Nick Sieger wrote: > > > Hi, I wrote an article [1] outlining some tricks I've developed adding > > > custom extensions into RSpec. But they all hinge upon > > > Spec::Runner::Context#before_context_eval and the > > > @context_eval_module ivar. So I was wondering whether this mechanism > can be > > > relied on in the future, or whether this is even the best way to wire in > > > such extensions. If you have a recommended way I'd love to hear about > it so > > > I can incorporate it into my article and make sure I don't highlight the > > > wrong way of doing things. > > > > > > > Regarding the stability of the API - I'm a little worried about having > > extensions use private variables. > > Agreed. I was still motivated to post, but I suspected you would think that > about the monkeypatching and the direct use of the ivar. I think I'll put a > small disclaimer at the top of the post, and keep it up to date to follow > whatever you guys think would be appropriate for an extension point API. > That sounds good. We're likely to debate what this API looks like for a while, because we only get one shot at it ;-) Here is my initial suggestion/example: Spec::Runner::Context.extend do |context_eval_module| context_eval_module.include StackMethods end class Spec::Runner::Context def self.extend(&block) @@extension_blocks << block end def initialize(name, &context_block) @name = name @context_eval_module = Module.new @context_eval_module.extend ContextEval::ModuleMethods @context_eval_module.include ContextEval::InstanceMethods @@extension_blocks.each{|b| b.call(@context_eval_module)} @context_eval_module.class_eval(&context_block) end end WDYT? > /Nick > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > > From nicksieger at gmail.com Tue Jan 2 12:36:38 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Tue, 2 Jan 2007 11:36:38 -0600 Subject: [rspec-devel] Feedback on article In-Reply-To: <8d961d900701020915u18f430dfv21ae731f65dee7a0@mail.gmail.com> References: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> <8d961d900701020915u18f430dfv21ae731f65dee7a0@mail.gmail.com> Message-ID: On 1/2/07, aslak hellesoy wrote: > > That sounds good. We're likely to debate what this API looks like for > a while, because we only get one shot at it ;-) Here is my initial > suggestion/example: > > Spec::Runner::Context.extend do |context_eval_module| > context_eval_module.include StackMethods > end > > class Spec::Runner::Context > def self.extend(&block) > @@extension_blocks << block > end > > def initialize(name, &context_block) > @name = name > > @context_eval_module = Module.new > @context_eval_module.extend ContextEval::ModuleMethods > @context_eval_module.include ContextEval::InstanceMethods > @@extension_blocks.each{|b| b.call(@context_eval_module)} > @context_eval_module.class_eval(&context_block) > end > end > > WDYT? That looks great. I can't imagine it needing to get much more complicated than that. I personally wouldn't change a thing. /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070102/6d1f930a/attachment-0001.html From noreply at rubyforge.org Tue Jan 2 15:40:39 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 15:40:39 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7533 ] Spec suite fails and the process exits with a code 0 Message-ID: <20070102204039.14BA252416C9@rubyforge.org> Bugs item #7533, was opened at 2007-01-02 12:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7533&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Spec suite fails and the process exits with a code 0 Initial Comment: The process should exit with an error code (e.g. 1) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7533&group_id=797 From noreply at rubyforge.org Tue Jan 2 15:55:56 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 15:55:56 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7533 ] Spec suite fails and the process exits with a code 0 Message-ID: <20070102205556.F158652416C9@rubyforge.org> Bugs item #7533, was opened at 2007-01-02 12:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7533&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Spec suite fails and the process exits with a code 0 Initial Comment: The process should exit with an error code (e.g. 1) ---------------------------------------------------------------------- >Comment By: Brian Takita (btakita) Date: 2007-01-02 12:55 Message: It happens because I called the `ruby spec_suite.rb` instead of `spec spec_suite.rb`. Should we default CommandLine#run exit argument to true? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7533&group_id=797 From noreply at rubyforge.org Tue Jan 2 18:26:37 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 18:26:37 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7536 ] Mock expectations can be called more than once and ordered Message-ID: <20070102232637.9FF555241CA6@rubyforge.org> Feature Requests item #7536, was opened at 2007-01-02 15:26 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Mock expectations can be called more than once and ordered Initial Comment: the_mock = mock("the_mock") the_mock.should_receive(:foo).ordered the_mock.should_receive(:bar).ordered the_mock.should_receive(:foo).ordered the_mock.should_receive(:baz).ordered ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797 From noreply at rubyforge.org Tue Jan 2 19:17:27 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 2 Jan 2007 19:17:27 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7536 ] Mock expectations can be called more than once and ordered Message-ID: <20070103001727.98AB15241CC6@rubyforge.org> Feature Requests item #7536, was opened at 2007-01-02 18:26 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Mock expectations can be called more than once and ordered Initial Comment: the_mock = mock("the_mock") the_mock.should_receive(:foo).ordered the_mock.should_receive(:bar).ordered the_mock.should_receive(:foo).ordered the_mock.should_receive(:baz).ordered ---------------------------------------------------------------------- >Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-01-02 19:17 Message: Do you have a failing spec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797 From noreply at rubyforge.org Thu Jan 4 13:14:59 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 4 Jan 2007 13:14:59 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7565 ] Subsequent stub! calls for method fail to override the first call to method Message-ID: <20070104181500.1AA745241979@rubyforge.org> Bugs item #7565, was opened at 2007-01-04 13:14 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7565&group_id=797 Category: mock module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Chris Hoffman (hoffman_c) Assigned to: Nobody (None) Summary: Subsequent stub! calls for method fail to override the first call to method Initial Comment: My collegue and I found a condition where subsequent calls to foo.stub!(:bar) did not override the original stubbed method, and did so silently (i.e., without informing the programmer by raising an exception). Upon further inspection, we found that the @stubs instance variable (mock_handler.rb) was being appended to in the add_stub method call. Then, when it comes time to execute this stubbed method, an array find is used (I forget where in the source) to find the appropriate return value. So, basically, the add_stub method call is dutifully adding a duplicate method to the array, and ignoring it by always retrieving the first stub matching the conditions. This hardly seems to be desired behavior. Would changing the @stubs variable to a hash be possible? I would think such an approach better than executing an array find. What follows is a contrived spec to further elucidate our findings. Obviously this example doesn't make much sense in practice, but we do need this functionality when setting up specs becomes more involved. Thanks. context 'A stub' do setup do @stub = mock("stub") @stub.stub!(:foo).and_return(1) @stub.stub!(:foo).and_return(2) end specify "should equal 2 when calling foo" do @stub.foo.should_eql 2 end end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7565&group_id=797 From noreply at rubyforge.org Fri Jan 5 02:13:31 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 02:13:31 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7536 ] Mock expectations can be called more than once and ordered Message-ID: <20070105071331.797155241F8F@rubyforge.org> Feature Requests item #7536, was opened at 2007-01-02 15:26 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Mock expectations can be called more than once and ordered Initial Comment: the_mock = mock("the_mock") the_mock.should_receive(:foo).ordered the_mock.should_receive(:bar).ordered the_mock.should_receive(:foo).ordered the_mock.should_receive(:baz).ordered ---------------------------------------------------------------------- >Comment By: Brian Takita (btakita) Date: 2007-01-04 23:13 Message: require "rubygems" require "spec" context "An Ordered mock" do specify "should allow a method to be ordered twice" do the_mock = mock("the_mock") the_mock.should_receive(:foo).ordered the_mock.should_receive(:bar).ordered the_mock.should_receive(:foo).ordered the_mock.should_receive(:baz).ordered the_mock.foo the_mock.bar the_mock.foo the_mock.baz end end ---------------------------------------------------------------------- Comment By: Aslak Helles?y (aslak_hellesoy) Date: 2007-01-02 16:17 Message: Do you have a failing spec? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7536&group_id=797 From brian.takita at gmail.com Fri Jan 5 02:49:19 2007 From: brian.takita at gmail.com (Brian Takita) Date: Thu, 4 Jan 2007 23:49:19 -0800 Subject: [rspec-devel] Feedback on article In-Reply-To: <8d961d900701020915u18f430dfv21ae731f65dee7a0@mail.gmail.com> References: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> <8d961d900701020915u18f430dfv21ae731f65dee7a0@mail.gmail.com> Message-ID: <1d7ddd110701042349m7703477dpf6e740d4bdaae585@mail.gmail.com> On 1/2/07, aslak hellesoy wrote: > > On 1/2/07, Nick Sieger wrote: > > On 1/2/07, aslak hellesoy wrote: > > > On 1/2/07, Nick Sieger wrote: > > > > Hi, I wrote an article [1] outlining some tricks I've developed > adding > > > > custom extensions into RSpec. But they all hinge upon > > > > Spec::Runner::Context#before_context_eval and the > > > > @context_eval_module ivar. So I was wondering whether this > mechanism > > can be > > > > relied on in the future, or whether this is even the best way to > wire in > > > > such extensions. If you have a recommended way I'd love to hear > about > > it so > > > > I can incorporate it into my article and make sure I don't highlight > the > > > > wrong way of doing things. > > > > > > > > > > Regarding the stability of the API - I'm a little worried about having > > > extensions use private variables. > > > > Agreed. I was still motivated to post, but I suspected you would think > that > > about the monkeypatching and the direct use of the ivar. I think I'll > put a > > small disclaimer at the top of the post, and keep it up to date to > follow > > whatever you guys think would be appropriate for an extension point API. > > > > That sounds good. We're likely to debate what this API looks like for > a while, because we only get one shot at it ;-) Here is my initial > suggestion/example: > > Spec::Runner::Context.extend do |context_eval_module| > context_eval_module.include StackMethods > end > > class Spec::Runner::Context > def self.extend(&block) > @@extension_blocks << block > end > > def initialize(name, &context_block) > @name = name > > @context_eval_module = Module.new > @context_eval_module.extend ContextEval::ModuleMethods > @context_eval_module.include ContextEval::InstanceMethods > @@extension_blocks.each{|b| b.call(@context_eval_module)} > @context_eval_module.class_eval(&context_block) > end > end > > WDYT? That looks good. It also exposes a missing feature in the Callbacks module. class Spec::Runner::Context class_callback_events :extend def initialize(name, &context_block) @name = name @context_eval_module = Module.new @context_eval_module.extend ContextEval::ModuleMethods @context_eval_module.include ContextEval::InstanceMethods notify_class_callbacks :extend, @context_eval_module @context_eval_module.class_eval(&context_block) end end > /Nick > > > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070104/6e7d6df1/attachment.html From brian.takita at gmail.com Fri Jan 5 03:03:40 2007 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 5 Jan 2007 00:03:40 -0800 Subject: [rspec-devel] Feedback on article In-Reply-To: <1d7ddd110701042349m7703477dpf6e740d4bdaae585@mail.gmail.com> References: <8d961d900701020829l380f4cccr4d4da158c1eeb197@mail.gmail.com> <8d961d900701020915u18f430dfv21ae731f65dee7a0@mail.gmail.com> <1d7ddd110701042349m7703477dpf6e740d4bdaae585@mail.gmail.com> Message-ID: <1d7ddd110701050003w7546a9d9r747dcb903799d173@mail.gmail.com> On 1/4/07, Brian Takita wrote: > > On 1/2/07, aslak hellesoy wrote: > > > On 1/2/07, Nick Sieger wrote: > > > On 1/2/07, aslak hellesoy wrote: > > > > On 1/2/07, Nick Sieger wrote: > > > > > Hi, I wrote an article [1] outlining some tricks I've developed > > adding > > > > > custom extensions into RSpec. But they all hinge upon > > > > > Spec::Runner::Context#before_context_eval and the > > > > > @context_eval_module ivar. So I was wondering whether this > > mechanism > > > can be > > > > > relied on in the future, or whether this is even the best way to > > wire in > > > > > such extensions. If you have a recommended way I'd love to hear > > about > > > it so > > > > > I can incorporate it into my article and make sure I don't > > highlight the > > > > > wrong way of doing things. > > > > > > > > > > > > > Regarding the stability of the API - I'm a little worried about > > having > > > > extensions use private variables. > > > > > > Agreed. I was still motivated to post, but I suspected you would > > think that > > > about the monkeypatching and the direct use of the ivar. I think I'll > > put a > > > small disclaimer at the top of the post, and keep it up to date to > > follow > > > whatever you guys think would be appropriate for an extension point > > API. > > > > > > > That sounds good. We're likely to debate what this API looks like for > > a while, because we only get one shot at it ;-) Here is my initial > > suggestion/example: > > > > Spec::Runner::Context.extend do |context_eval_module| > > context_eval_module.include StackMethods > > end > > > > class Spec::Runner::Context > > def self.extend(&block) > > @@extension_blocks << block > > end > > > > def initialize(name, &context_block) > > @name = name > > > > @context_eval_module = Module.new > > @context_eval_module.extend ContextEval::ModuleMethods > > @context_eval_module.include ContextEval::InstanceMethods > > @@extension_blocks.each{|b| b.call(@context_eval_module)} > > @context_eval_module.class_eval(&context_block) > > end > > end > > > > WDYT? > > > That looks good. It also exposes a missing feature in the Callbacks > module. > > class Spec::Runner::Context > class_callback_events :extend > > def initialize(name, &context_block) > @name = name > > @context_eval_module = Module.new > @context_eval_module.extend ContextEval::ModuleMethods > @context_eval_module.include ContextEval::InstanceMethods > notify_class_callbacks :extend, @context_eval_module > @context_eval_module.class_eval(&context_block) > end > end > Is extend a better term than before_context_eval? Is there a better term to use? > /Nick > > > > > > > > > _______________________________________________ > > > 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 > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070105/9d0d8c56/attachment-0001.html From noreply at rubyforge.org Fri Jan 5 09:09:15 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 09:09:15 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7591 ] When controller is missing action method, Rspec reports misleading "no id found" Message-ID: <20070105140915.A2D725240C2E@rubyforge.org> Bugs item #7591, was opened at 2007-01-05 14:09 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7591&group_id=797 Category: rails plugin Group: None Status: Open Resolution: None Priority: 3 Submitted By: Clint Bishop (norobotdiving) Assigned to: Nobody (None) Summary: When controller is missing action method, Rspec reports misleading "no id found" Initial Comment: Under Rspec 0.7.5 on Rails Edge (Jan 03 2007): The following will fail (correctly) if no "my_action" method is defined upon the my_controller controller. To error report will read "no id found" - the standard message for a method_missing failure. However, the error report is misleading, since we're expecting the ActionController to raise an UnknownAction exception. Snippet: context "Some context" do controller_name 'my_controller' specify "some spec" do xhr :post, :my_action, :a_value => true end end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7591&group_id=797 From noreply at rubyforge.org Fri Jan 5 19:35:25 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 19:35:25 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7611 ] Partial Mocks override Subclass methods Message-ID: <20070106003525.71B4552417FA@rubyforge.org> Bugs item #7611, was opened at 2007-01-05 16:35 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7611&group_id=797 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Partial Mocks override Subclass methods Initial Comment: Here is a quick error case that is order dependent. The first spec must run first. I'll post a better spec later. require "rubygems" require "spec" class Foo end class Bar < Foo end context "A Partial Mock" do specify "should respect subclasses" do Foo.stub!(:new).and_return(Object.new) end specify "should" do Bar.new.class.should == Bar end end # output .F 1) 'A Partial Mock should' FAILED Foo should == Bar /home/btakita/workspace/scratch/lib/bdd/partial_mock_subclass_bug.rb:17: /home/btakita/workspace/scratch/lib/bdd/partial_mock_subclass_bug.rb:11: Finished in 0.001406 seconds 2 specifications, 1 failure ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7611&group_id=797 From noreply at rubyforge.org Fri Jan 5 20:19:29 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 20:19:29 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7533 ] Spec suite fails and the process exits with a code 0 Message-ID: <20070106011929.B5E875241812@rubyforge.org> Bugs item #7533, was opened at 2007-01-02 12:40 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7533&group_id=797 Category: runner module Group: None Status: Open Resolution: None Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Spec suite fails and the process exits with a code 0 Initial Comment: The process should exit with an error code (e.g. 1) ---------------------------------------------------------------------- >Comment By: Brian Takita (btakita) Date: 2007-01-05 17:19 Message: Ouch, I got bitten by this again. ---------------------------------------------------------------------- Comment By: Brian Takita (btakita) Date: 2007-01-02 12:55 Message: It happens because I called the `ruby spec_suite.rb` instead of `spec spec_suite.rb`. Should we default CommandLine#run exit argument to true? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7533&group_id=797 From noreply at rubyforge.org Fri Jan 5 20:21:22 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 20:21:22 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7612 ] Add ENV['RAILS_ENV'] = 'test' at the top of spec_helper.rb Message-ID: <20070106012122.D8CE65241812@rubyforge.org> Feature Requests item #7612, was opened at 2007-01-05 17:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7612&group_id=797 Category: rails plugin Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: Add ENV['RAILS_ENV'] = 'test' at the top of spec_helper.rb Initial Comment: Otherwise, specs are run in development mode. Very confusing. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7612&group_id=797 From noreply at rubyforge.org Fri Jan 5 20:25:34 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 20:25:34 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7613 ] context#include should add constants into the context Message-ID: <20070106012535.25B2D5241812@rubyforge.org> Feature Requests item #7613, was opened at 2007-01-05 17:25 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7613&group_id=797 Category: None Group: None Status: Open Priority: 3 Submitted By: Brian Takita (btakita) Assigned to: Nobody (None) Summary: context#include should add constants into the context Initial Comment: dir = File.dirname(__FILE__) require "#{dir}/spec_helper" module Foo class Bar end end context "A Context include statement" do include Foo specify "should add constants accessable in the context" do b = Bar.new end end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7613&group_id=797 From noreply at rubyforge.org Fri Jan 5 21:20:44 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Jan 2007 21:20:44 -0500 (EST) Subject: [rspec-devel] [ rspec-Feature Requests-7612 ] Add ENV['RAILS_ENV'] = 'test' at the top of spec_helper.rb Message-ID: <20070106022044.170E05241812@rubyforge.org> Feature Requests item #7612, was opened at 2007-01-06 01:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7612&group_id=797 Category: rails plugin Group: None >Status: Closed Priority: 3 Submitted By: Brian Takita (btakita) >Assigned to: David Chelimsky (dchelimsky) Summary: Add ENV['RAILS_ENV'] = 'test' at the top of spec_helper.rb Initial Comment: Otherwise, specs are run in development mode. Very confusing. ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-01-06 02:20 Message: This was fixed in the trunk some time ago (but after 0.7.5). Will be part of next release. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3152&aid=7612&group_id=797 From brian.takita at gmail.com Sat Jan 6 05:43:52 2007 From: brian.takita at gmail.com (Brian Takita) Date: Sat, 6 Jan 2007 02:43:52 -0800 Subject: [rspec-devel] Build Breaking? Message-ID: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> Hello, The build is breaking for me. 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED Is anybody else having this issue? I seem to remember getting this before. Thanks, Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070106/477cc329/attachment.html From brian.takita at gmail.com Sat Jan 6 05:56:47 2007 From: brian.takita at gmail.com (Brian Takita) Date: Sat, 6 Jan 2007 02:56:47 -0800 Subject: [rspec-devel] Build Breaking? In-Reply-To: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> References: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> Message-ID: <1d7ddd110701060256n3d376219j855700f44b67fef5@mail.gmail.com> It has to do with the backtraces. Actual: 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: /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:16: /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir' /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each' /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: Expected: 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:16: ./spec/spec/runner/formatter/html_formatter_spec.rb:12: ./spec/spec/runner/formatter/html_formatter_spec.rb:11: On 1/6/07, Brian Takita wrote: > > Hello, > > The build is breaking for me. > > 1) 'HtmlFormatter should produce HTML identical to the one we designed > manually' FAILED > > Is anybody else having this issue? I seem to remember getting this before. > > > Thanks, > Brian > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070106/a5bcaaa3/attachment.html From brian.takita at gmail.com Sat Jan 6 06:13:44 2007 From: brian.takita at gmail.com (Brian Takita) Date: Sat, 6 Jan 2007 03:13:44 -0800 Subject: [rspec-devel] Build Breaking? In-Reply-To: <1d7ddd110701060256n3d376219j855700f44b67fef5@mail.gmail.com> References: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> <1d7ddd110701060256n3d376219j855700f44b67fef5@mail.gmail.com> Message-ID: <1d7ddd110701060313w21ce0584g538b1bd4f4781bfc@mail.gmail.com> I changed BaseTextFormatter def backtrace_line(line) line.sub(Dir.pwd, '.').sub(/\A([^:]+:\d+)$/, '\\1:') end This spec seems OS specific... /usr/local/bin/ruby /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb F 1) 'HtmlFormatter should produce HTML identical to the one we designed manually' FAILED "\n\n\n\n\n RSpec results\n \n \n \n \n \n\n\n\n
\n

RSpec Results

\n\n
\n

 

\n

 

\n
\n
\n\n
\n
\n
\n
Mocker
\n \n
should be able to call mock()
\n \n \n \n
\n should fail when expected message not received\n
\n
Mock 'poke me'
expected :poke with (any args) once, but received it 0
times
\n
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
`chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
`each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n
\n
\n \n \n \n
\n should fail when messages are received out of order\n
\n
Mock 'one two three'
received :three out of order
\n
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
`chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
`each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n
\n
\n \n \n \n
\n should get yelled at when sending unexpected messages\n
\n
Mock 'don't talk to me' expected :any_message_at_all
with (any args) 0 times, but received it once
\n
./failing_examples/mocking_example.rb:28:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
`chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
`each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n
\n
\n
\n
\n
\n
\n
Running specs with --diff
\n \n \n \n
\n should print diff of different strings\n
\n
"RSpec is
a\\nbehavior driven development\\nframework for Ruby\\n" should ==
"RSpec is a\\nbehaviour driven development\\nframework for
Ruby\\n"\nDiff:\n@@ -1,4 +1,4 @@\n RSpec is a\n-behavior driven
development\n+behaviour driven development\n framework for
Ruby\n
\n
./failing_examples/diffing_spec.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
`chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
`each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n
\n
\n \n \n \n
\n should print diff of different objects' pretty representation\n
\n
<Animal\nname=bob,\nspecies=giraffe\n>\n should
eql <Animal\nname=bob,\nspecies=tortoise\n>\n\nDiff:\n@@ -1,5 +1,5
@@\n <Animal\n name=bob,\n-species=giraffe\n+species=tortoise\n
>\n
\n
./failing_examples/diffing_spec.rb:34:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
`chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
`each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n
\n
\n
\n
\n
\n
\n
A consumer of a stub
\n \n
should be able to stub methods on any Object
\n
\n
\n
\n
\n
A stubbed method on a class
\n \n
should return the stubbed value
\n \n
should revert to the original method after each spec
\n \n
can stub! and mock the same message
\n
\n
\n
\n
\n
A mock
\n \n
can stub!
\n \n
can stub! and mock
\n \n
can stub! and mock the same message
\n
\n
\n\n\n
\n\n\n" should == "\n\n\n\n\n RSpec results\n \n \n \n \n \n\n\n\n
\n

RSpec Results

\n\n
\n

 

\n

 

\n
\n
\n\n
\n
\n
\n
Mocker
\n \n
should be able to call mock()
\n \n \n \n
\n should fail when expected message not received\n
\n
Mock 'poke me'
expected :poke with (any args) once, but received it 0
times
\n
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n
\n
\n \n \n \n
\n should fail when messages are received out of order\n
\n
Mock 'one two three'
received :three out of order
\n
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n
\n
\n \n \n \n
\n should get yelled at when sending unexpected messages\n
\n
Mock 'don't talk to me' expected :any_message_at_all
with (any args) 0 times, but received it once
\n
./failing_examples/mocking_example.rb:28:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n
\n
\n
\n
\n
\n
\n
Running specs with --diff
\n \n \n \n
\n should print diff of different strings\n
\n
"RSpec is
a\\nbehavior driven development\\nframework for Ruby\\n" should ==
"RSpec is a\\nbehaviour driven development\\nframework for
Ruby\\n"\nDiff:\n@@ -1,4 +1,4 @@\n RSpec is a\n-behavior driven
development\n+behaviour driven development\n framework for
Ruby\n
\n
./failing_examples/diffing_spec.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n
\n
\n \n \n \n
\n should print diff of different objects' pretty representation\n
\n
<Animal\nname=bob,\nspecies=giraffe\n>\n should
eql <Animal\nname=bob,\nspecies=tortoise\n>\n\nDiff:\n@@ -1,5 +1,5
@@\n <Animal\n name=bob,\n-species=giraffe\n+species=tortoise\n
>\n
\n
./failing_examples/diffing_spec.rb:34:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n
\n
\n
\n
\n
\n
\n
A consumer of a stub
\n \n
should be able to stub methods on any Object
\n
\n
\n
\n
\n
A stubbed method on a class
\n \n
should return the stubbed value
\n \n
should revert to the original method after each spec
\n \n
can stub! and mock the same message
\n
\n
\n
\n
\n
A mock
\n \n
can stub!
\n \n
can stub! and mock
\n \n
can stub! and mock the same message
\n
\n
\n\n\n
\n\n\n" Diff: @@ -120,11 +120,8 @@
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:
-./spec/spec/runner/formatter/html_formatter_spec.rb:4:
+./spec/spec/runner/formatter/html_formatter_spec.rb:11: @@ -136,11 +133,8 @@
Mock 'one two three' received :three out
of order
./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:
-./spec/spec/runner/formatter/html_formatter_spec.rb:4:
+./spec/spec/runner/formatter/html_formatter_spec.rb:11: @@ -152,11 +146,8 @@
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:
-./spec/spec/runner/formatter/html_formatter_spec.rb:4:
+./spec/spec/runner/formatter/html_formatter_spec.rb:11: @@ -180,11 +171,8 @@
./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:
-./spec/spec/runner/formatter/html_formatter_spec.rb:4:
+./spec/spec/runner/formatter/html_formatter_spec.rb:11: @@ -212,11 +200,8 @@
./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:
-./spec/spec/runner/formatter/html_formatter_spec.rb:4:
+./spec/spec/runner/formatter/html_formatter_spec.rb:11: ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:31: ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir' ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each' ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: Finished in 0.235957 seconds 1 specification, 1 failure Process finished with exit code 0 On 1/6/07, Brian Takita wrote: > > It has to do with the backtraces. > > Actual: > 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: > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:16: > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in `chdir' > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in `each' > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: > > > Expected: > > 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:16: > ./spec/spec/runner/formatter/html_formatter_spec.rb:12: > ./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > On 1/6/07, Brian Takita wrote: > > > > Hello, > > > > The build is breaking for me. > > > > 1) 'HtmlFormatter should produce HTML identical to the one we designed > > manually' FAILED > > > > Is anybody else having this issue? I seem to remember getting this > > before. > > > > Thanks, > > Brian > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070106/48eb5990/attachment-0001.html From dchelimsky at gmail.com Sat Jan 6 08:37:51 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Sat, 6 Jan 2007 08:37:51 -0500 Subject: [rspec-devel] Build Breaking? In-Reply-To: <1d7ddd110701060313w21ce0584g538b1bd4f4781bfc@mail.gmail.com> References: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> <1d7ddd110701060256n3d376219j855700f44b67fef5@mail.gmail.com> <1d7ddd110701060313w21ce0584g538b1bd4f4781bfc@mail.gmail.com> Message-ID: <57c63afe0701060537s28b9efd3mb5ba26d76effbc55@mail.gmail.com> On 1/6/07, Brian Takita wrote: > I changed BaseTextFormatter > > def backtrace_line(line) > line.sub(Dir.pwd, '.').sub(/\A([^:]+:\d+)$/, '\\1:') > end > > This spec seems OS specific... > > /usr/local/bin/ruby > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb Try standing in /home/btakita/workspace/rspec/rspec. That's where it's intended to be run from. > > F > > 1) > 'HtmlFormatter should produce HTML identical to the one we designed > manually' FAILED > " encoding=\"iso-8859-1\"?>\n \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \" > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > lang=\"en\">\n\n RSpec results\n http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n > \n http-equiv=\"Pragma\" content=\"no-cache\" />\n \n \n\n\n\n
\n >

RSpec Results

\n\n
\n

id=\"duration\"> 

\n

 

\n >
\n
\n\n
\n
\n
\n >
Mocker
\n \n
class=\"passed_spec_name\">should be able to call > mock()
\n \n > \n > \n
\n class=\"failed_spec_name\">should fail when expected > message not received\n
id=\"failure_1\">\n
Mock 'poke me'
> expected :poke with (any args) once, but received it 0 times
\n >
class=\"backtrace\">
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n >
\n
\n \n > \n > \n
\n class=\"failed_spec_name\">should fail when messages are > received out of order\n
id=\"failure_2\">\n
Mock 'one two three'
> received :three out of order
\n
class=\"backtrace\">
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n >
\n
\n \n > \n > \n
\n class=\"failed_spec_name\">should get yelled at when > sending unexpected messages\n
id=\"failure_3\">\n
Mock 'don't talk to
> me' expected :any_message_at_all with (any args) 0 times, but received it
> once
\n
class=\"backtrace\">
./failing_examples/mocking_example.rb:28:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n >
\n
\n
\n
\n
\n
\n >
Running specs with --diff
\n \n > \n > \n
\n class=\"failed_spec_name\">should print diff of different > strings\n
\n
class=\"message\">
"RSpec is a\\nbehavior driven
> development\\nframework for Ruby\\n" should == "RSpec is
> a\\nbehaviour driven development\\nframework for Ruby\\n"\nDiff:\n@@
> -1,4 +1,4 @@\n RSpec is a\n-behavior driven development\n+behaviour driven
> development\n framework for Ruby\n
\n
class=\"backtrace\">
./failing_examples/diffing_spec.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n >
\n
\n \n > \n > \n
\n class=\"failed_spec_name\">should print diff of different > objects' pretty representation\n
id=\"failure_5\">\n
class=\"message\">
<Animal\nname=bob,\nspecies=giraffe\n>\n
> should eql
> <Animal\nname=bob,\nspecies=tortoise\n>\n\nDiff:\n@@
> -1,5 +1,5 @@\n <Animal\n
> name=bob,\n-species=giraffe\n+species=tortoise\n
> >\n
\n
class=\"backtrace\">
./failing_examples/diffing_spec.rb:34:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n >
\n
\n
\n
\n
\n
\n >
A consumer of a stub
\n \n
class=\"passed_spec_name\">should be able to stub methods > on any Object
\n
\n
\n
\n >
\n
A stubbed method on a class
\n \n
class=\"passed_spec_name\">should return the stubbed > value
\n \n
class=\"passed_spec_name\">should revert to the original > method after each spec
\n \n
class=\"passed_spec_name\">can stub! and mock the same message
\n >
\n
\n
\n
\n
A > mock
\n \n
class=\"passed_spec_name\">can stub!
\n \n
class=\"passed_spec_name\">can stub! and mock
\n \n
class=\"passed_spec_name\">can stub! and mock the same message
\n >
\n
\n\n\n
\n\n\n" should == > " encoding=\"iso-8859-1\"?>\n \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n > \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\ > ">\n\n lang=\"en\">\n\n RSpec results\n http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n > \n http-equiv=\"Pragma\" content=\"no-cache\" />\n \n \n\n\n\n
\n >

RSpec Results

\n\n
\n

id=\"duration\"> 

\n

 

\n >
\n
\n\n
\n
\n
\n >
Mocker
\n \n
class=\"passed_spec_name\">should be able to call > mock()
\n \n > \n > \n
\n class=\"failed_spec_name\">should fail when expected > message not received\n
id=\"failure_1\">\n
Mock 'poke me'
> expected :poke with (any args) once, but received it 0 times
\n >
class=\"backtrace\">
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n >
\n
\n \n > \n > \n
\n class=\"failed_spec_name\">should fail when messages are > received out of order\n
id=\"failure_2\">\n
Mock 'one two three'
> received :three out of order
\n
class=\"backtrace\">
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n >
\n
\n \n > \n > \n
\n class=\"failed_spec_name\">should get yelled at when > sending unexpected messages\n
id=\"failure_3\">\n
Mock 'don't talk to
> me' expected :any_message_at_all with (any args) 0 times, but received it
> once
\n
class=\"backtrace\">
./failing_examples/mocking_example.rb:28:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n >
\n
\n
\n
\n
class=\"context\">\n
\n
Running specs with > --diff
\n \n > \n > \n
\n class=\"failed_spec_name\">should print diff of different > strings\n
\n
class=\"message\">
"RSpec is a\\nbehavior driven
> development\\nframework for Ruby\\n" should == "RSpec is
> a\\nbehaviour driven development\\nframework for Ruby\\n"\nDiff:\n@@
> -1,4 +1,4 @@\n RSpec is a\n-behavior driven development\n+behaviour driven
> development\n framework for Ruby\n
\n
class=\"backtrace\">
./failing_examples/diffing_spec.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n >
\n
\n \n > \n > \n
\n class=\"failed_spec_name\">should print diff of different > objects' pretty representation\n
id=\"failure_5\">\n
class=\"message\">
<Animal\nname=bob,\nspecies=giraffe\n>\n
> should eql
> <Animal\nname=bob,\nspecies=tortoise\n>\n\nDiff:\n@@
> -1,5 +1,5 @@\n <Animal\n
> name=bob,\n-species=giraffe\n+species=tortoise\n
> >\n
\n
class=\"backtrace\">
./failing_examples/diffing_spec.rb:34:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n >
\n
\n
\n
\n
\n
\n >
A consumer of a stub
\n \n
class=\"passed_spec_name\">should be able to stub methods > on any Object
\n
\n
\n
\n >
\n
A stubbed method on a class
\n \n
class=\"passed_spec_name\">should return the stubbed > value
\n \n
class=\"passed_spec_name\">should revert to the original > method after each spec
\n \n
class=\"passed_spec_name\">can stub! and mock the same message
\n >
\n
\n
\n
\n
A > mock
\n \n
class=\"passed_spec_name\">can stub!
\n \n
class=\"passed_spec_name\">can stub! and mock
\n \n
class=\"passed_spec_name\">can stub! and mock the same message
\n >
\n
\n\n\n
\n\n\n" > Diff: > > @@ -120,11 +120,8 @@ >
Mock 'poke me' expected :poke with (any
> args) once, but received it 0 times
>
class="backtrace">
./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:
> -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > This seems to me to be about ruby version (and what it adds to backtraces), not OS. What version of ruby are you using? > > @@ -136,11 +133,8 @@ >
Mock 'one two three' received :three out
> of order
>
class="backtrace">
./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:
> -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > @@ -152,11 +146,8 @@ >
Mock 'don't talk to me' expected
> :any_message_at_all with (any args) 0 times, but received it
> once
>
class="backtrace">
./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:
> -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > @@ -180,11 +171,8 @@ > >
class="backtrace">
./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:
> -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > @@ -212,11 +200,8 @@ > >
class="backtrace">
./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:
> -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:31: > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in > `chdir' > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in > `each' > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: > > Finished in 0.235957 seconds > > 1 specification, 1 failure > > Process finished with exit code 0 > > > > On 1/6/07, Brian Takita < brian.takita at gmail.com> wrote: > > It has to do with the backtraces. > > > > Actual: > > 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: > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:16: > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in > `chdir' > > > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in > `each' > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: > > > > Expected: > > > > 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:16: > > ./spec/spec/runner/formatter/html_formatter_spec.rb:12: > > ./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > > > > > On 1/6/07, Brian Takita < brian.takita at gmail.com> wrote: > > > > > Hello, > > > > > > The build is breaking for me. > > > > > > 1) 'HtmlFormatter should produce HTML identical to the one we designed > manually' FAILED > > > > > > Is anybody else having this issue? I seem to remember getting this > before. > > > > > > Thanks, > > > Brian > > > > > > > > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > > From dchelimsky at gmail.com Sat Jan 6 08:39:04 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Sat, 6 Jan 2007 08:39:04 -0500 Subject: [rspec-devel] Build Breaking? In-Reply-To: <57c63afe0701060537s28b9efd3mb5ba26d76effbc55@mail.gmail.com> References: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> <1d7ddd110701060256n3d376219j855700f44b67fef5@mail.gmail.com> <1d7ddd110701060313w21ce0584g538b1bd4f4781bfc@mail.gmail.com> <57c63afe0701060537s28b9efd3mb5ba26d76effbc55@mail.gmail.com> Message-ID: <57c63afe0701060539y2e37bf88v480db037aecfc22@mail.gmail.com> On 1/6/07, David Chelimsky wrote: > On 1/6/07, Brian Takita wrote: > > I changed BaseTextFormatter > > > > def backtrace_line(line) > > line.sub(Dir.pwd, '.').sub(/\A([^:]+:\d+)$/, '\\1:') > > end > > > > This spec seems OS specific... > > > > /usr/local/bin/ruby > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb > > Try standing in /home/btakita/workspace/rspec/rspec. That's where it's > intended to be run from. To clarify - you won't have to add the pwd replace if you run it from the rspec root (rspec/rspec in this case). > > > > > F > > > > 1) > > 'HtmlFormatter should produce HTML identical to the one we designed > > manually' FAILED > > " > encoding=\"iso-8859-1\"?>\n > \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \" > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n > xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > > lang=\"en\">\n\n RSpec results\n > http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n > > \n > http-equiv=\"Pragma\" content=\"no-cache\" />\n \n \n\n\n\n
\n > >

RSpec Results

\n\n
\n

> id=\"duration\"> 

\n

 

\n > >
\n
\n\n
\n
\n
\n > >
Mocker
\n \n
> class=\"passed_spec_name\">should be able to call > > mock()
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should fail when expected > > message not received\n
> id=\"failure_1\">\n
Mock 'poke me'
> > expected :poke with (any args) once, but received it 0 times
\n > >
> class=\"backtrace\">
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > >
\n
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should fail when messages are > > received out of order\n
> id=\"failure_2\">\n
Mock 'one two three'
> > received :three out of order
\n
> class=\"backtrace\">
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > >
\n
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should get yelled at when > > sending unexpected messages\n
> id=\"failure_3\">\n
Mock 'don't talk to
> > me' expected :any_message_at_all with (any args) 0 times, but received it
> > once
\n
> class=\"backtrace\">
./failing_examples/mocking_example.rb:28:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > >
\n
\n
\n
\n
\n
\n > >
Running specs with --diff
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should print diff of different > > strings\n
\n
> class=\"message\">
"RSpec is a\\nbehavior driven
> > development\\nframework for Ruby\\n" should == "RSpec is
> > a\\nbehaviour driven development\\nframework for Ruby\\n"\nDiff:\n@@
> > -1,4 +1,4 @@\n RSpec is a\n-behavior driven development\n+behaviour driven
> > development\n framework for Ruby\n
\n
> class=\"backtrace\">
./failing_examples/diffing_spec.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > >
\n
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should print diff of different > > objects' pretty representation\n
> id=\"failure_5\">\n
> class=\"message\">
<Animal\nname=bob,\nspecies=giraffe\n>\n
> > should eql
> > <Animal\nname=bob,\nspecies=tortoise\n>\n\nDiff:\n@@
> > -1,5 +1,5 @@\n <Animal\n
> > name=bob,\n-species=giraffe\n+species=tortoise\n
> > >\n
\n
> class=\"backtrace\">
./failing_examples/diffing_spec.rb:34:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > >
\n
\n
\n
\n
\n
\n > >
A consumer of a stub
\n \n
> class=\"passed_spec_name\">should be able to stub methods > > on any Object
\n
\n
\n
\n > >
\n
A stubbed method on a class
\n \n
> class=\"passed_spec_name\">should return the stubbed > > value
\n \n
> class=\"passed_spec_name\">should revert to the original > > method after each spec
\n \n
> class=\"passed_spec_name\">can stub! and mock the same message
\n > >
\n
\n
\n
\n
A > > mock
\n \n
> class=\"passed_spec_name\">can stub!
\n \n
> class=\"passed_spec_name\">can stub! and mock
\n \n
> class=\"passed_spec_name\">can stub! and mock the same message
\n > >
\n
\n\n\n
\n\n\n" should == > > " > encoding=\"iso-8859-1\"?>\n > \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n > > \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\ > > ">\n\n > lang=\"en\">\n\n RSpec results\n > http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n > > \n > http-equiv=\"Pragma\" content=\"no-cache\" />\n \n \n\n\n\n
\n > >

RSpec Results

\n\n
\n

> id=\"duration\"> 

\n

 

\n > >
\n
\n\n
\n
\n
\n > >
Mocker
\n \n
> class=\"passed_spec_name\">should be able to call > > mock()
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should fail when expected > > message not received\n
> id=\"failure_1\">\n
Mock 'poke me'
> > expected :poke with (any args) once, but received it 0 times
\n > >
> class=\"backtrace\">
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n > >
\n
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should fail when messages are > > received out of order\n
> id=\"failure_2\">\n
Mock 'one two three'
> > received :three out of order
\n
> class=\"backtrace\">
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n > >
\n
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should get yelled at when > > sending unexpected messages\n
> id=\"failure_3\">\n
Mock 'don't talk to
> > me' expected :any_message_at_all with (any args) 0 times, but received it
> > once
\n
> class=\"backtrace\">
./failing_examples/mocking_example.rb:28:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n > >
\n
\n
\n
\n
> class=\"context\">\n
\n
Running specs with > > --diff
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should print diff of different > > strings\n
\n
> class=\"message\">
"RSpec is a\\nbehavior driven
> > development\\nframework for Ruby\\n" should == "RSpec is
> > a\\nbehaviour driven development\\nframework for Ruby\\n"\nDiff:\n@@
> > -1,4 +1,4 @@\n RSpec is a\n-behavior driven development\n+behaviour driven
> > development\n framework for Ruby\n
\n
> class=\"backtrace\">
./failing_examples/diffing_spec.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n > >
\n
\n \n > > \n > > \n
\n > class=\"failed_spec_name\">should print diff of different > > objects' pretty representation\n
> id=\"failure_5\">\n
> class=\"message\">
<Animal\nname=bob,\nspecies=giraffe\n>\n
> > should eql
> > <Animal\nname=bob,\nspecies=tortoise\n>\n\nDiff:\n@@
> > -1,5 +1,5 @@\n <Animal\n
> > name=bob,\n-species=giraffe\n+species=tortoise\n
> > >\n
\n
> class=\"backtrace\">
./failing_examples/diffing_spec.rb:34:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:
\n > >
\n
\n
\n
\n
\n
\n > >
A consumer of a stub
\n \n
> class=\"passed_spec_name\">should be able to stub methods > > on any Object
\n
\n
\n
\n > >
\n
A stubbed method on a class
\n \n
> class=\"passed_spec_name\">should return the stubbed > > value
\n \n
> class=\"passed_spec_name\">should revert to the original > > method after each spec
\n \n
> class=\"passed_spec_name\">can stub! and mock the same message
\n > >
\n
\n
\n
\n
A > > mock
\n \n
> class=\"passed_spec_name\">can stub!
\n \n
> class=\"passed_spec_name\">can stub! and mock
\n \n
> class=\"passed_spec_name\">can stub! and mock the same message
\n > >
\n
\n\n\n
\n\n\n" > > Diff: > > > > @@ -120,11 +120,8 @@ > >
Mock 'poke me' expected :poke with (any
> > args) once, but received it 0 times
> >
> class="backtrace">
./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:
> > -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> > +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > This seems to me to be about ruby version (and what it adds to > backtraces), not OS. What version of ruby are you using? > > > > > @@ -136,11 +133,8 @@ > >
Mock 'one two three' received :three out
> > of order
> >
> class="backtrace">
./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:
> > -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> > +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > > > @@ -152,11 +146,8 @@ > >
Mock 'don't talk to me' expected
> > :any_message_at_all with (any args) 0 times, but received it
> > once
> >
> class="backtrace">
./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:
> > -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> > +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > > > @@ -180,11 +171,8 @@ > > > >
> class="backtrace">
./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:
> > -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> > +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > > > @@ -212,11 +200,8 @@ > > > >
> class="backtrace">
./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:
> > -./spec/spec/runner/formatter/html_formatter_spec.rb:4:
> > +./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:31: > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in > > `chdir' > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in > > `each' > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: > > ./rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: > > > > Finished in 0.235957 seconds > > > > 1 specification, 1 failure > > > > Process finished with exit code 0 > > > > > > > > On 1/6/07, Brian Takita < brian.takita at gmail.com> wrote: > > > It has to do with the backtraces. > > > > > > Actual: > > > 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: > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:16: > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12:in > > `chdir' > > > > > > > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:12: > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11:in > > `each' > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:4: > > > > > > Expected: > > > > > > 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:16: > > > ./spec/spec/runner/formatter/html_formatter_spec.rb:12: > > > ./spec/spec/runner/formatter/html_formatter_spec.rb:11: > > > > > > > > > > > > > > > > > > On 1/6/07, Brian Takita < brian.takita at gmail.com> wrote: > > > > > > > Hello, > > > > > > > > The build is breaking for me. > > > > > > > > 1) 'HtmlFormatter should produce HTML identical to the one we designed > > manually' FAILED > > > > > > > > Is anybody else having this issue? I seem to remember getting this > > before. > > > > > > > > Thanks, > > > > Brian > > > > > > > > > > > > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > From noreply at rubyforge.org Sat Jan 6 09:03:58 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 6 Jan 2007 09:03:58 -0500 (EST) Subject: [rspec-devel] [ rspec-Bugs-7565 ] Subsequent stub! calls for method fail to override the first call to method Message-ID: <20070106140358.9F73E5240F10@rubyforge.org> Bugs item #7565, was opened at 2007-01-04 18:14 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7565&group_id=797 Category: mock module Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Chris Hoffman (hoffman_c) >Assigned to: David Chelimsky (dchelimsky) Summary: Subsequent stub! calls for method fail to override the first call to method Initial Comment: My collegue and I found a condition where subsequent calls to foo.stub!(:bar) did not override the original stubbed method, and did so silently (i.e., without informing the programmer by raising an exception). Upon further inspection, we found that the @stubs instance variable (mock_handler.rb) was being appended to in the add_stub method call. Then, when it comes time to execute this stubbed method, an array find is used (I forget where in the source) to find the appropriate return value. So, basically, the add_stub method call is dutifully adding a duplicate method to the array, and ignoring it by always retrieving the first stub matching the conditions. This hardly seems to be desired behavior. Would changing the @stubs variable to a hash be possible? I would think such an approach better than executing an array find. What follows is a contrived spec to further elucidate our findings. Obviously this example doesn't make much sense in practice, but we do need this functionality when setting up specs becomes more involved. Thanks. context 'A stub' do setup do @stub = mock("stub") @stub.stub!(:foo).and_return(1) @stub.stub!(:foo).and_return(2) end specify "should equal 2 when calling foo" do @stub.foo.should_eql 2 end end ---------------------------------------------------------------------- >Comment By: David Chelimsky (dchelimsky) Date: 2007-01-06 14:03 Message: Fixed in trunk (rev 1361) Stubs are now added to the front of the Array, so the one it finds will be the last one that was set. Perhaps not as elegant as using a Hash, but it keeps the code simpler and works just fine. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7565&group_id=797 From dchelimsky at gmail.com Sat Jan 6 09:06:58 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Sat, 6 Jan 2007 09:06:58 -0500 Subject: [rspec-devel] Build Breaking? In-Reply-To: <57c63afe0701060539y2e37bf88v480db037aecfc22@mail.gmail.com> References: <1d7ddd110701060243s3e8cac4dkb8d6c1ed7c9dbb29@mail.gmail.com> <1d7ddd110701060256n3d376219j855700f44b67fef5@mail.gmail.com> <1d7ddd110701060313w21ce0584g538b1bd4f4781bfc@mail.gmail.com> <57c63afe0701060537s28b9efd3mb5ba26d76effbc55@mail.gmail.com> <57c63afe0701060539y2e37bf88v480db037aecfc22@mail.gmail.com> Message-ID: <57c63afe0701060606n4092fbc3n2d9132442215f95d@mail.gmail.com> On 1/6/07, David Chelimsky wrote: > On 1/6/07, David Chelimsky wrote: > > On 1/6/07, Brian Takita wrote: > > > I changed BaseTextFormatter > > > > > > def backtrace_line(line) > > > line.sub(Dir.pwd, '.').sub(/\A([^:]+:\d+)$/, '\\1:') > > > end > > > > > > This spec seems OS specific... > > > > > > /usr/local/bin/ruby > > > /home/btakita/workspace/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb > > > > Try standing in /home/btakita/workspace/rspec/rspec. That's where it's > > intended to be run from. > > To clarify - you won't have to add the pwd replace if you run it from > the rspec root (rspec/rspec in this case). > > > > > > > > > F > > > > > > 1) > > > 'HtmlFormatter should produce HTML identical to the one we designed > > > manually' FAILED > > > " > > encoding=\"iso-8859-1\"?>\n > > \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \" > > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n > > xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > > > lang=\"en\">\n\n RSpec results\n > > http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n > > > \n > > http-equiv=\"Pragma\" content=\"no-cache\" />\n \n \n\n\n\n
\n > > >

RSpec Results

\n\n
\n

> > id=\"duration\"> 

\n

 

\n > > >
\n
\n\n
\n
\n
\n > > >
Mocker
\n \n
> > class=\"passed_spec_name\">should be able to call > > > mock()
\n \n > > > \n > > > \n
\n > > class=\"failed_spec_name\">should fail when expected > > > message not received\n
> > id=\"failure_1\">\n
Mock 'poke me'
> > > expected :poke with (any args) once, but received it 0 times
\n > > >
> > class=\"backtrace\">
./failing_examples/mocking_example.rb:13:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > > >
\n
\n \n > > > \n > > > \n
\n > > class=\"failed_spec_name\">should fail when messages are > > > received out of order\n
> > id=\"failure_2\">\n
Mock 'one two three'
> > > received :three out of order
\n
> > class=\"backtrace\">
./failing_examples/mocking_example.rb:22:\n./spec/spec/runner/formatter/html_formatter_spec.rb:16:\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:in
> > > `chdir'\n./spec/spec/runner/formatter/html_formatter_spec.rb:12:\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:in
> > > `each'\n./spec/spec/runner/formatter/html_formatter_spec.rb:11:\n./spec/spec/runner/formatter/html_formatter_spec.rb:4:
\n > > >
\n
\n \n > > > \n > > > \n
\n > > class=\"failed_spec_name\">should get yelled at when > > > sending unexpected messages\n
> > id=\"failure_3\">