From dchelimsky at gmail.com Wed Apr 1 02:07:05 2009 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 1 Apr 2009 01:07:05 -0500 Subject: [rspec-devel] pending caller Message-ID: <57c63afe0903312307v1ddb6fa6s46fe489c0f5603e6@mail.gmail.com> Hi all, The rspec-1.2.2 release cleaned up what gets passed to formatters, introducing ExampleGroupProxy and ExampleProxy objects that each export description() and location(): description is the docstring passed to describe() and it() or any of their aliases location is the filename and line number where the group or example was declared Currently the formatters have an example_pending method: example_pending(example_proxy, message, pending_location) The pending_location (previously pending_caller) is the file and line number where the pending statement is declared, as opposed to the location of the example. So in this case: describe "subject" do it "does something" do pending "a fix" do subject.should_not be_broken end end end example_group.location is line 1 example.location is line 2 pending_location is line 3 I'm thinking that now that example_group.location and example.location are consistent, that pending_location is redundant even though it's a different line. Of course the problem here is how to effectively deprecate pending_location, but that's another matter :) Any thoughts about this? -- David From scott at railsnewbie.com Wed Apr 1 03:50:24 2009 From: scott at railsnewbie.com (Scott Taylor) Date: Wed, 01 Apr 2009 03:50:24 -0400 Subject: [rspec-devel] pending caller In-Reply-To: <57c63afe0903312307v1ddb6fa6s46fe489c0f5603e6@mail.gmail.com> References: <57c63afe0903312307v1ddb6fa6s46fe489c0f5603e6@mail.gmail.com> Message-ID: <49D31CC0.1050103@railsnewbie.com> David Chelimsky wrote: > Hi all, > > The rspec-1.2.2 release cleaned up what gets passed to formatters, > introducing ExampleGroupProxy and ExampleProxy objects that each > export description() and location(): > > description is the docstring passed to describe() and it() or any of > their aliases > location is the filename and line number where the group or example was declared > > Currently the formatters have an example_pending method: > > example_pending(example_proxy, message, pending_location) > > The pending_location (previously pending_caller) is the file and line > number where the pending statement is declared, as opposed to the > location of the example. So in this case: > > describe "subject" do > it "does something" do > pending "a fix" do > subject.should_not be_broken > end > end > end > > example_group.location is line 1 > example.location is line 2 > pending_location is line 3 > > I'm thinking that now that example_group.location and example.location > are consistent, that pending_location is redundant even though it's a > different line. > Yeah - it is. You'll want the line number of the example, not of the pending call. Speaking of which, I'd sort of like the file and line numbers for xit'ed specs. Scott > Of course the problem here is how to effectively deprecate > pending_location, but that's another matter :) > > Any thoughts about this? > > -- David > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From aslak.hellesoy at gmail.com Tue Apr 7 08:50:22 2009 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 7 Apr 2009 14:50:22 +0200 Subject: [rspec-devel] [Cucumber] Spring cleaning Message-ID: <8d961d900904070550v1cb7b9c3oe74e94f2dd4c1052@mail.gmail.com> There are a lot of open tickets in Cucumber, and it's hard for me to know which ones to prioritize. Several of them are either obsolete or not very important. I need your help to decide. I'm therefore going to put all tickets on hold. If you feel a particular ticket should be reopened, please comment on it and specify the following: * Is this still an issue with the latest code in github? (follow "Building the Gem yourself" instructions on http://wiki.github.com/aslakhellesoy/cucumber and mention the SHA). * Are you going to provide a patch for it? (in your own forked repo). If not, please argue why someone else should spend time fixing it for you. Thanks for your understanding and help, Aslak -------------- next part -------------- An HTML attachment was scrubbed... URL: From aslak.hellesoy at gmail.com Tue Apr 7 10:11:55 2009 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 7 Apr 2009 16:11:55 +0200 Subject: [rspec-devel] [Cucumber] Spring cleaning In-Reply-To: <8d961d900904070550v1cb7b9c3oe74e94f2dd4c1052@mail.gmail.com> References: <8d961d900904070550v1cb7b9c3oe74e94f2dd4c1052@mail.gmail.com> Message-ID: <8d961d900904070711w3894201drbb86fc6702b78288@mail.gmail.com> On Tue, Apr 7, 2009 at 2:50 PM, aslak hellesoy wrote: > There are a lot of open tickets in Cucumber, and it's hard for me to know > which ones to prioritize. > Several of them are either obsolete or not very important. I need your help > to decide. > > I'm therefore going to put all tickets on hold. If you feel a particular > ticket should be reopened, please comment on it and specify the following: > That was fun - with a mix of Lighthouse's ruby API and cURL I got rid of 57 tickets in no time! :-) http://gist.github.com/91248 Now I hope you'll help me reopen the important ones... Aslak > * Is this still an issue with the latest code in github? (follow "Building > the Gem yourself" instructions on > http://wiki.github.com/aslakhellesoy/cucumber and mention the SHA). > * Are you going to provide a patch for it? (in your own forked repo). If > not, please argue why someone else should spend time fixing it for you. > > Thanks for your understanding and help, > Aslak > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aslak.hellesoy at gmail.com Tue Apr 7 10:13:40 2009 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 7 Apr 2009 16:13:40 +0200 Subject: [rspec-devel] [Cucumber] Spring cleaning In-Reply-To: <8d961d900904070711w3894201drbb86fc6702b78288@mail.gmail.com> References: <8d961d900904070550v1cb7b9c3oe74e94f2dd4c1052@mail.gmail.com> <8d961d900904070711w3894201drbb86fc6702b78288@mail.gmail.com> Message-ID: <8d961d900904070713r315ba908w8aa86407580c601f@mail.gmail.com> On Tue, Apr 7, 2009 at 4:11 PM, aslak hellesoy wrote: > > > On Tue, Apr 7, 2009 at 2:50 PM, aslak hellesoy wrote: > >> There are a lot of open tickets in Cucumber, and it's hard for me to know >> which ones to prioritize. >> Several of them are either obsolete or not very important. I need your >> help to decide. >> >> I'm therefore going to put all tickets on hold. If you feel a particular >> ticket should be reopened, please comment on it and specify the following: >> > > That was fun - with a mix of Lighthouse's ruby API and cURL I got rid of 57 > tickets in no time! :-) > http://gist.github.com/91248 > Unfortunately it looks like tags were cleared, so please add them back if you comment on tickets on hold... Aslak > > Now I hope you'll help me reopen the important ones... > > Aslak > > >> * Is this still an issue with the latest code in github? (follow "Building >> the Gem yourself" instructions on >> http://wiki.github.com/aslakhellesoy/cucumber and mention the SHA). >> * Are you going to provide a patch for it? (in your own forked repo). If >> not, please argue why someone else should spend time fixing it for you. >> >> Thanks for your understanding and help, >> Aslak >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ketanpadegaonkar at gmail.com Fri Apr 10 01:25:44 2009 From: ketanpadegaonkar at gmail.com (Ketan Padegaonkar) Date: Fri, 10 Apr 2009 10:55:44 +0530 Subject: [rspec-devel] Cucumber on Eclipse RCP Message-ID: <49DED858.30705@gmail.com> Hi, Just wanted to drop in a line to mention that it is now possible to run cucumber on eclipse rcp[1]. This allows rcp based applications to be tested using cucumber. [1] - http://ketan.padegaonkar.name/2009/04/10/cucumber-on-jruby-inside-eclipse.html -- Ketan From ben at benmabey.com Fri Apr 10 11:22:23 2009 From: ben at benmabey.com (Ben Mabey) Date: Fri, 10 Apr 2009 09:22:23 -0600 Subject: [rspec-devel] Cucumber on Eclipse RCP In-Reply-To: <49DED858.30705@gmail.com> References: <49DED858.30705@gmail.com> Message-ID: <49DF642F.3030108@benmabey.com> Ketan Padegaonkar wrote: > Hi, > > Just wanted to drop in a line to mention that it is now possible to > run cucumber on eclipse rcp[1]. > > This allows rcp based applications to be tested using cucumber. > > [1] - > http://ketan.padegaonkar.name/2009/04/10/cucumber-on-jruby-inside-eclipse.html > > > -- Ketan Very cool! I've added a link to the post from the wiki: http://wiki.github.com/aslakhellesoy/cucumber/tutorials-and-related-blog-posts Thanks, Ben From dchelimsky at gmail.com Wed Apr 15 10:18:46 2009 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 15 Apr 2009 11:18:46 -0300 Subject: [rspec-devel] [ANN] rspec 1.2.4 Released Message-ID: <57c63afe0904150718m42345029v61575df42617a31b@mail.gmail.com> rspec version 1.2.4 has been released! Be sure to check History.rdoc and Updgrade.rdoc at http://rspec.rubyforge.org/rspec/1.2.4/ before upgrading. * * * * Behaviour Driven Development for Ruby. Changes: ### Version 1.2.4 * bug fix * just one - update the manifest ### Version 1.2.3 * enhancements * support for specifying single examples with colon syntax. Closes #712. (Ben Mabey) * you can now say "spec some_spec.rb:12" in addition to "spec some_spec.rb --line 12" * run specs locally with --drb if no drb server is running. Closes #780. * still prints "No server running" to stderr * bug fixes * support expectations on DelegateClass (Clifford T. Matthews). Closes #48. * Fixed match_array blows up if elements can't be sorted (Jeff Dean). Closes #779. * deprecations * BaseFormatter#add_example_group (use #example_group_started instead) * ExampleGroupProxy#backtrace (use #location instead) * ExampleProxy#backtrace (use #location instead) * BaseFormatter#example_pending now expects two arguments. The third argument is deprecated. * ExampleGroupProxy#filtered_description. This was only used in one place internally, and was a confusing solution to the problem. If you've got a custom formatter that uses it, you can just use ExampleGroupProxy#description and modify it directly. * predicate_matchers (use the new Matcher DSL instead) * Spec::Matchers.create (use Spec::Matchers.define instead) * * * * From brian at pivotallabs.com Wed Apr 29 12:42:27 2009 From: brian at pivotallabs.com (Brian Takita) Date: Wed, 29 Apr 2009 09:42:27 -0700 Subject: [rspec-devel] Confusion over SharedExampleGroups Message-ID: <1d7ddd110904290942m26d2061bt35ac5b9a452c075e@mail.gmail.com> A colleague of mine ran into issues with the usage of SharedExampleGroups. He was expecting it to create its own ExampleGroup (describe block) when it is invoked using it_should_behave_like, and was surprised when test pollution occurred due to a before block in the SharedExampleGroup. What is your experience with this? Should there be another type of SharedExampleGroup that does encapsulate before blocks? For example, shared_describe "My shared specs" do before do @defined_in_shared_example_group = true end it "should not interfere with other specs" do end end describe Foobar do it_should_behave_like "My shared specs" it "should not see defined_in_shared_example_group" do @defined_in_shared_example_group.should be_nil end end From dchelimsky at gmail.com Wed Apr 29 12:51:14 2009 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 29 Apr 2009 11:51:14 -0500 Subject: [rspec-devel] Confusion over SharedExampleGroups In-Reply-To: <1d7ddd110904290942m26d2061bt35ac5b9a452c075e@mail.gmail.com> References: <1d7ddd110904290942m26d2061bt35ac5b9a452c075e@mail.gmail.com> Message-ID: <57c63afe0904290951t23a2b8e6w88277d802b18e4d9@mail.gmail.com> On Wed, Apr 29, 2009 at 11:42 AM, Brian Takita wrote: > A colleague of mine ran into issues with the usage of SharedExampleGroups. > > He was expecting it to create its own ExampleGroup (describe block) > when it is invoked using it_should_behave_like, and was surprised when > test pollution occurred due to a before block in the > SharedExampleGroup. > > What is your experience with this? > > Should there be another type of SharedExampleGroup that does > encapsulate before blocks? > > For example, > > shared_describe "My shared specs" do > ?before do > ? ?@defined_in_shared_example_group = true > ?end > > ?it "should not interfere with other specs" do > ?end > end > > describe Foobar do > ?it_should_behave_like "My shared specs" > > ?it "should not see defined_in_shared_example_group" do > ? ?@defined_in_shared_example_group.should be_nil > ?end > end What's the point of doing this? i.e. why would you want a shared group that does not share state? They are not parameterized, so they are not configurable except through shared state. Unless you're thinking that the shared state is access to Foobar through described class, which begs the question if we're sharing some state, why not share all state? From dchelimsky at gmail.com Wed Apr 29 13:16:03 2009 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 29 Apr 2009 12:16:03 -0500 Subject: [rspec-devel] Confusion over SharedExampleGroups In-Reply-To: <57c63afe0904290951t23a2b8e6w88277d802b18e4d9@mail.gmail.com> References: <1d7ddd110904290942m26d2061bt35ac5b9a452c075e@mail.gmail.com> <57c63afe0904290951t23a2b8e6w88277d802b18e4d9@mail.gmail.com> Message-ID: <1479A6A8-1BDB-4BCF-A0CD-A28A37B1421B@gmail.com> On Apr 29, 2009, at 11:51 AM, David Chelimsky wrote: > On Wed, Apr 29, 2009 at 11:42 AM, Brian Takita > wrote: >> A colleague of mine ran into issues with the usage of >> SharedExampleGroups. >> >> He was expecting it to create its own ExampleGroup (describe block) >> when it is invoked using it_should_behave_like, and was surprised >> when >> test pollution occurred due to a before block in the >> SharedExampleGroup. >> >> What is your experience with this? >> >> Should there be another type of SharedExampleGroup that does >> encapsulate before blocks? >> >> For example, >> >> shared_describe "My shared specs" do >> before do >> @defined_in_shared_example_group = true >> end >> >> it "should not interfere with other specs" do >> end >> end >> >> describe Foobar do >> it_should_behave_like "My shared specs" >> >> it "should not see defined_in_shared_example_group" do >> @defined_in_shared_example_group.should be_nil >> end >> end > > What's the point of doing this? i.e. why would you want a shared group > that does not share state? They are not parameterized, so they are not > configurable except through shared state. Unless you're thinking that > the shared state is access to Foobar through described class, which > begs the question if we're sharing some state, why not share all > state? Actually, if the shared group ends up being a subclass, then befores in the current group would be available to the shared group, but not the other way round. Then the subgroup could be named "behaving like My shared specs" or some such. Thoughts? From dchelimsky at gmail.com Wed Apr 29 23:55:11 2009 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 29 Apr 2009 22:55:11 -0500 Subject: [rspec-devel] [ANN] rspec 1.2.5 Released Message-ID: <57c63afe0904292055w5ba91fcel9bbcc60a885ba453@mail.gmail.com> rspec version 1.2.5 has been released! * * * * Behaviour Driven Development for Ruby. Changes: ### Version 1.2.5 / 2009-04-29 * enhancements * name argument to mock/stub is now optional (closes #782) * you can do mock(:foo => "woo", :bar => "car") * expect { this_block }.to change{this.expression}.from(old_value).to(new_value) * expect { this_block }.to raise_error * better failiure messages for equal matcher (James Byrne). Closes #804. * add stub_chain method * also alias_method :stub, :stub!, so you can stub with less bang * added options to example_group_proxy * bug fixes * ensure correct handling of ordered message expectations with duplicate expectations (NigelThorne). Closes #793. * get matcher backwards compat working w/ ruby 19 * don't define instance_exec unless it is not defined * was doing a version check, but turns out that didn't cover alternative implementations like JRuby * fix bug where in some circumstances, loading lib/spec/interop/test.rb raised an error (tsechingho). Closes #803. * make sure specs only run against spec server when using drb (patch from Chuck Grindel). Closes #797. * remove deprecation warning in example_pending when using FailingExamplesFormatter. Closes #794. * Access explicit subject from nested groups of arbitrary depth. Closes #756. * * * * From dchelimsky at gmail.com Wed Apr 29 23:55:17 2009 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 29 Apr 2009 22:55:17 -0500 Subject: [rspec-devel] [ANN] rspec-rails 1.2.5 Released Message-ID: <57c63afe0904292055q1ee060dhf17327359b0f5e6e@mail.gmail.com> rspec-rails version 1.2.5 has been released! * * * * * Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.5 / 2009-04-29 * enhancements * support :xml and :strict config options for have_tag matcher (patch from Peer Allan and Max Murphy). Closes #783. * bug fixes * Fixed a small typo that makes rake stats fail (Jos? Valim). Closes #802. * link_to and friends are available to ViewExampleGroup again (J.B. Rainsberger). Closes #787. * spec_server works correctly with rails 2.3 again (Neil Buckley). Closes #759. * * * * *