From james at imaj.es Sun Jun 1 16:12:53 2008 From: james at imaj.es (James Cox) Date: Sun, 1 Jun 2008 21:12:53 +0100 Subject: [rspec-devel] erroneous output when running specs formatted as specdoc.. In-Reply-To: <5B839FE2-FB67-4622-BDC5-E1BF6BB6F1A8@gmail.com> References: <14C76B95-1FE3-4F8E-9CF9-9C24319E7FEC@imaj.es> <5B839FE2-FB67-4622-BDC5-E1BF6BB6F1A8@gmail.com> Message-ID: <05726A60-777E-4CB1-958E-51D1864431A5@imaj.es> On 29 May 2008, at 22:29, David Chelimsky wrote: > On May 29, 2008, at 12:19 PM, James Cox wrote: > >> Hey, >> >> i see this output: >> >> Spec::Rails::Example::ViewExampleGroup >> >> Spec::Rails::Example::HelperExampleGroup >> >> Spec::Rails::Example::ControllerExampleGroup >> >> Spec::Rails::Example::FunctionalExampleGroup >> >> Spec::Rails::Example::ModelExampleGroup >> >> Spec::Rails::Example::RailsExampleGroup >> >> >> about 2-3 times when running through specs. Looks like someone did >> some introspection and puts the class they were in... > > It's a bug - already reported: http://rspec.lighthouseapp.com/projects/5645/tickets/412-printout awesome. Here's some patchwork: http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/412-printout#ticket-412-3 :D james From mvanholstyn at gmail.com Wed Jun 4 14:26:07 2008 From: mvanholstyn at gmail.com (Mark Van Holstyn) Date: Wed, 4 Jun 2008 14:26:07 -0400 Subject: [rspec-devel] Patch to make helper specs more consistent Message-ID: Anyone have time to review http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/426-make-helper-specs-more-consistent ? Thanks, -- Mark Van Holstyn, Partner / Software Developer mvanholstyn at mutuallyhuman.com, (616) 706-6842 Mutually Human Software, http://mutuallyhuman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hayafirst at gmail.com Wed Jun 4 15:15:03 2008 From: hayafirst at gmail.com (Yi Wen) Date: Wed, 4 Jun 2008 14:15:03 -0500 Subject: [rspec-devel] Tutorial Message-ID: I cloned rspec source and try to run rake, and got 4 failures after installing a bunch of gems. So just wonder is there any tutorial or instruction on how to pass all specs? Thanks. BTW: the failures are: 1) 'ExampleGroup with test/unit/interop with failing examples should return an exit code of 256' FAILED expected: 256, got: # (using ==) Diff: @@ -1,2 +1,2 @@ -256 +# ./spec/spec/interop/test/unit/spec_spec.rb:30: 2) 'ExampleGroup with test/unit/interop with example that raises an error should return an exit code of 256' FAILED expected: 256, got: # (using ==) Diff: @@ -1,2 +1,2 @@ -256 +# ./spec/spec/interop/test/unit/spec_spec.rb:42: 3) 'Test::Unit::TestCase with failing test case should return an exit code of 256' FAILED expected: 256, got: # (using ==) Diff: @@ -1,2 +1,2 @@ -256 +# ./spec/spec/interop/test/unit/testcase_spec.rb:30: 4) 'Test::Unit::TestCase with test case that raises an error should return an exit code of 256' FAILED expected: 256, got: # (using ==) Diff: @@ -1,2 +1,2 @@ -256 +# Yi From pergesu at gmail.com Wed Jun 4 17:32:38 2008 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 4 Jun 2008 14:32:38 -0700 Subject: [rspec-devel] Patch to make helper specs more consistent In-Reply-To: References: Message-ID: <810a540e0806041432u227c9ef8q7d69c2688b457579@mail.gmail.com> On Wed, Jun 4, 2008 at 11:26 AM, Mark Van Holstyn wrote: > Anyone have time to review > http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/426-make-helper-specs-more-consistent? Hey Mark, Thanks for the patch. Tickets show up in lighthouse, and I subscribe to the RSS feed (as I'm sure others do), so we do see them. In the future, it's not necessary to send a message to the mailing list. Pat From mvanholstyn at gmail.com Wed Jun 4 17:33:55 2008 From: mvanholstyn at gmail.com (Mark Van Holstyn) Date: Wed, 4 Jun 2008 17:33:55 -0400 Subject: [rspec-devel] Patch to make helper specs more consistent In-Reply-To: <810a540e0806041432u227c9ef8q7d69c2688b457579@mail.gmail.com> References: <810a540e0806041432u227c9ef8q7d69c2688b457579@mail.gmail.com> Message-ID: Good to know! I will let the internet take care of this for me in the future :) Mark On Wed, Jun 4, 2008 at 5:32 PM, Pat Maddox wrote: > On Wed, Jun 4, 2008 at 11:26 AM, Mark Van Holstyn > wrote: > > Anyone have time to review > > > http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/426-make-helper-specs-more-consistent > ? > > Hey Mark, > > Thanks for the patch. Tickets show up in lighthouse, and I subscribe > to the RSS feed (as I'm sure others do), so we do see them. In the > future, it's not necessary to send a message to the mailing list. > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Mark Van Holstyn, Partner / Software Developer mvanholstyn at mutuallyhuman.com, (616) 706-6842 Mutually Human Software, http://mutuallyhuman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailing_lists at railsnewbie.com Wed Jun 4 22:07:06 2008 From: mailing_lists at railsnewbie.com (Scott Taylor) Date: Wed, 4 Jun 2008 22:07:06 -0400 Subject: [rspec-devel] Tutorial In-Reply-To: References: Message-ID: On Jun 4, 2008, at 3:15 PM, Yi Wen wrote: > I cloned rspec source and try to run rake, and got 4 failures after > installing a bunch of gems. So just wonder is there any tutorial or > instruction on how to pass all specs? Thanks. > I'd suggest posting (and searching for) a lighthouse ticket, with your version of Ruby, OS, etc. Scott From pergesu at gmail.com Wed Jun 4 22:53:56 2008 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 4 Jun 2008 19:53:56 -0700 Subject: [rspec-devel] Tutorial In-Reply-To: References: Message-ID: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen wrote: > I cloned rspec source and try to run rake, and got 4 failures after > installing a bunch of gems. So just wonder is there any tutorial or > instruction on how to pass all specs? Thanks. > > BTW: the failures are: > > 1) > 'ExampleGroup with test/unit/interop with failing examples should > return an exit code of 256' FAILED > expected: 256, > got: # (using ==) > Diff: > @@ -1,2 +1,2 @@ > -256 > +# > > ./spec/spec/interop/test/unit/spec_spec.rb:30: > > 2) > 'ExampleGroup with test/unit/interop with example that raises an error > should return an exit code of 256' FAILED > expected: 256, > got: # (using ==) > Diff: > @@ -1,2 +1,2 @@ > -256 > +# > > ./spec/spec/interop/test/unit/spec_spec.rb:42: > > 3) > 'Test::Unit::TestCase with failing test case should return an exit > code of 256' FAILED > expected: 256, > got: # (using ==) > Diff: > @@ -1,2 +1,2 @@ > -256 > +# > > ./spec/spec/interop/test/unit/testcase_spec.rb:30: > > 4) > 'Test::Unit::TestCase with test case that raises an error should > return an exit code of 256' FAILED > expected: 256, > got: # (using ==) > Diff: > @@ -1,2 +1,2 @@ > -256 > +# > > > Yi > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > I remember getting similar errors when I built some version of Ruby myself. It was either really old or really recent, or it was stuff with dtrace. What's the full ruby version info? Pat From hayafirst at gmail.com Wed Jun 4 22:59:29 2008 From: hayafirst at gmail.com (Yi Wen) Date: Wed, 4 Jun 2008 21:59:29 -0500 Subject: [rspec-devel] Tutorial In-Reply-To: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> Message-ID: ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] OS is leopard, upgraded from Tiger. Thanks On Wed, Jun 4, 2008 at 9:53 PM, Pat Maddox wrote: > On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen wrote: >> I cloned rspec source and try to run rake, and got 4 failures after >> installing a bunch of gems. So just wonder is there any tutorial or >> instruction on how to pass all specs? Thanks. >> >> BTW: the failures are: >> >> 1) >> 'ExampleGroup with test/unit/interop with failing examples should >> return an exit code of 256' FAILED >> expected: 256, >> got: # (using ==) >> Diff: >> @@ -1,2 +1,2 @@ >> -256 >> +# >> >> ./spec/spec/interop/test/unit/spec_spec.rb:30: >> >> 2) >> 'ExampleGroup with test/unit/interop with example that raises an error >> should return an exit code of 256' FAILED >> expected: 256, >> got: # (using ==) >> Diff: >> @@ -1,2 +1,2 @@ >> -256 >> +# >> >> ./spec/spec/interop/test/unit/spec_spec.rb:42: >> >> 3) >> 'Test::Unit::TestCase with failing test case should return an exit >> code of 256' FAILED >> expected: 256, >> got: # (using ==) >> Diff: >> @@ -1,2 +1,2 @@ >> -256 >> +# >> >> ./spec/spec/interop/test/unit/testcase_spec.rb:30: >> >> 4) >> 'Test::Unit::TestCase with test case that raises an error should >> return an exit code of 256' FAILED >> expected: 256, >> got: # (using ==) >> Diff: >> @@ -1,2 +1,2 @@ >> -256 >> +# >> >> >> Yi >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > > I remember getting similar errors when I built some version of Ruby > myself. It was either really old or really recent, or it was stuff > with dtrace. What's the full ruby version info? > > Pat > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From mailing_lists at railsnewbie.com Wed Jun 4 23:07:15 2008 From: mailing_lists at railsnewbie.com (Scott Taylor) Date: Wed, 4 Jun 2008 23:07:15 -0400 Subject: [rspec-devel] Tutorial In-Reply-To: References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> Message-ID: <0FDF7C77-73BC-45EA-9F4C-BDEA80B92785@railsnewbie.com> On Jun 4, 2008, at 10:59 PM, Yi Wen wrote: > ruby --version > ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] > > OS is leopard, upgraded from Tiger. It's the one from Darwin/Mac Ports, correct? Scott From pergesu at gmail.com Thu Jun 5 00:10:38 2008 From: pergesu at gmail.com (Pat Maddox) Date: Wed, 4 Jun 2008 21:10:38 -0700 Subject: [rspec-devel] Tutorial In-Reply-To: References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> Message-ID: <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> Yeah, that's just too old. Upgrade your XCode / custom ruby install. Pat On Wed, Jun 4, 2008 at 7:59 PM, Yi Wen wrote: > ruby --version > ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] > > OS is leopard, upgraded from Tiger. > > Thanks > > On Wed, Jun 4, 2008 at 9:53 PM, Pat Maddox wrote: >> On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen wrote: >>> I cloned rspec source and try to run rake, and got 4 failures after >>> installing a bunch of gems. So just wonder is there any tutorial or >>> instruction on how to pass all specs? Thanks. >>> >>> BTW: the failures are: >>> >>> 1) >>> 'ExampleGroup with test/unit/interop with failing examples should >>> return an exit code of 256' FAILED >>> expected: 256, >>> got: # (using ==) >>> Diff: >>> @@ -1,2 +1,2 @@ >>> -256 >>> +# >>> >>> ./spec/spec/interop/test/unit/spec_spec.rb:30: >>> >>> 2) >>> 'ExampleGroup with test/unit/interop with example that raises an error >>> should return an exit code of 256' FAILED >>> expected: 256, >>> got: # (using ==) >>> Diff: >>> @@ -1,2 +1,2 @@ >>> -256 >>> +# >>> >>> ./spec/spec/interop/test/unit/spec_spec.rb:42: >>> >>> 3) >>> 'Test::Unit::TestCase with failing test case should return an exit >>> code of 256' FAILED >>> expected: 256, >>> got: # (using ==) >>> Diff: >>> @@ -1,2 +1,2 @@ >>> -256 >>> +# >>> >>> ./spec/spec/interop/test/unit/testcase_spec.rb:30: >>> >>> 4) >>> 'Test::Unit::TestCase with test case that raises an error should >>> return an exit code of 256' FAILED >>> expected: 256, >>> got: # (using ==) >>> Diff: >>> @@ -1,2 +1,2 @@ >>> -256 >>> +# >>> >>> >>> Yi >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >> >> I remember getting similar errors when I built some version of Ruby >> myself. It was either really old or really recent, or it was stuff >> with dtrace. What's the full ruby version info? >> >> Pat >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From mailing_lists at railsnewbie.com Thu Jun 5 00:40:57 2008 From: mailing_lists at railsnewbie.com (Scott Taylor) Date: Thu, 5 Jun 2008 00:40:57 -0400 Subject: [rspec-devel] Tutorial In-Reply-To: <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> Message-ID: <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> On Jun 5, 2008, at 12:10 AM, Pat Maddox wrote: > Yeah, that's just too old. Upgrade your XCode / custom ruby install. Actually, it looks like Darwinports now has ruby 1.8.6 patchlevel 114: scott-taylors-macbook:~ smt$ port search ruby subversion-rubybindings devel/subversion-rubybindings 1.4.6 Ruby bindings for the subversion version control system. jruby lang/jruby 1.1.1 JRuby is an 100% pure-Java implementation of the Ruby programming language. ruby lang/ruby 1.8.6-p114 Powerful and clean object-oriented scripting language ruby19 lang/ruby19 1.9.0-1 Powerful and clean object-oriented scripting language rb-bioruby ruby/rb-bioruby 0.6.2 Integrated environment for bioinformatics. rb-fxruby ruby/rb-fxruby 1.6.13 Ruby bindings for the FOX GUI Toolkit. rb-plruby ruby/rb-plruby 0.5.2 PL/Ruby for PostgreSQL rb-rubycon ruby/rb-rubycon 0.8 Toolkit for building concept processing and reasoning systems. rb-rubyforge ruby/rb-rubyforge 0.4.1 A simplistic script which automates a limited set of rubyforge operations rb-rubygems ruby/rb-rubygems 1.1.1 a package management framework for Ruby rb-rubyinline ruby/rb-rubyinline 3.6.2 Multi- language extension coding within ruby. rb-rubytoc ruby/rb-rubytoc 1.0.0.5 Ruby (subset) to C translator. rb-technorati-ruby ruby/rb-technorati-ruby 0.1.0 Technorati(http://technorati.com/) bindings for Ruby. eruby www/eruby 1.0.5 Ruby embedded into text (HTML) pages mod_ruby www/mod_ruby 1.2.6 apache2 module embedding the Ruby interpreter Scott > > > Pat > > On Wed, Jun 4, 2008 at 7:59 PM, Yi Wen wrote: >> ruby --version >> ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] >> >> OS is leopard, upgraded from Tiger. >> >> Thanks >> >> On Wed, Jun 4, 2008 at 9:53 PM, Pat Maddox wrote: >>> On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen wrote: >>>> I cloned rspec source and try to run rake, and got 4 failures after >>>> installing a bunch of gems. So just wonder is there any tutorial or >>>> instruction on how to pass all specs? Thanks. >>>> >>>> BTW: the failures are: >>>> >>>> 1) >>>> 'ExampleGroup with test/unit/interop with failing examples should >>>> return an exit code of 256' FAILED >>>> expected: 256, >>>> got: # (using ==) >>>> Diff: >>>> @@ -1,2 +1,2 @@ >>>> -256 >>>> +# >>>> >>>> ./spec/spec/interop/test/unit/spec_spec.rb:30: >>>> >>>> 2) >>>> 'ExampleGroup with test/unit/interop with example that raises an >>>> error >>>> should return an exit code of 256' FAILED >>>> expected: 256, >>>> got: # (using ==) >>>> Diff: >>>> @@ -1,2 +1,2 @@ >>>> -256 >>>> +# >>>> >>>> ./spec/spec/interop/test/unit/spec_spec.rb:42: >>>> >>>> 3) >>>> 'Test::Unit::TestCase with failing test case should return an exit >>>> code of 256' FAILED >>>> expected: 256, >>>> got: # (using ==) >>>> Diff: >>>> @@ -1,2 +1,2 @@ >>>> -256 >>>> +# >>>> >>>> ./spec/spec/interop/test/unit/testcase_spec.rb:30: >>>> >>>> 4) >>>> 'Test::Unit::TestCase with test case that raises an error should >>>> return an exit code of 256' FAILED >>>> expected: 256, >>>> got: # (using ==) >>>> Diff: >>>> @@ -1,2 +1,2 @@ >>>> -256 >>>> +# >>>> >>>> >>>> Yi >>>> _______________________________________________ >>>> rspec-devel mailing list >>>> rspec-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>> >>> >>> I remember getting similar errors when I built some version of Ruby >>> myself. It was either really old or really recent, or it was stuff >>> with dtrace. What's the full ruby version info? >>> >>> Pat >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From hayafirst at gmail.com Thu Jun 5 02:03:30 2008 From: hayafirst at gmail.com (Yi Wen) Date: Thu, 5 Jun 2008 01:03:30 -0500 Subject: [rspec-devel] Tutorial In-Reply-To: <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> Message-ID: Updated to ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-darwin9.2.2] Now down to 2 failures: 'Spec::Runner::Formatter::HtmlFormatter should produce HTML identical to the one we designed manually with --diff' FAILED 'Spec::Runner::Formatter::TextMateFormatter functional spec using --diff should produce HTML identical to the one we designed manually with --diff' FAILED Any idea? Thanks Yi On Wed, Jun 4, 2008 at 11:40 PM, Scott Taylor wrote: > > On Jun 5, 2008, at 12:10 AM, Pat Maddox wrote: > >> Yeah, that's just too old. Upgrade your XCode / custom ruby install. > > Actually, it looks like Darwinports now has ruby 1.8.6 patchlevel 114: > > scott-taylors-macbook:~ smt$ port search ruby > subversion-rubybindings devel/subversion-rubybindings 1.4.6 > Ruby bindings for the subversion version control system. > jruby lang/jruby 1.1.1 JRuby is an 100% > pure-Java implementation of the Ruby programming language. > ruby lang/ruby 1.8.6-p114 Powerful and > clean object-oriented scripting language > ruby19 lang/ruby19 1.9.0-1 Powerful and > clean object-oriented scripting language > rb-bioruby ruby/rb-bioruby 0.6.2 Integrated > environment for bioinformatics. > rb-fxruby ruby/rb-fxruby 1.6.13 Ruby bindings for > the FOX GUI Toolkit. > rb-plruby ruby/rb-plruby 0.5.2 PL/Ruby for > PostgreSQL > rb-rubycon ruby/rb-rubycon 0.8 Toolkit for > building concept processing and reasoning systems. > rb-rubyforge ruby/rb-rubyforge 0.4.1 A simplistic > script which automates a limited set of rubyforge operations > rb-rubygems ruby/rb-rubygems 1.1.1 a package > management framework for Ruby > rb-rubyinline ruby/rb-rubyinline 3.6.2 > Multi-language extension coding within ruby. > rb-rubytoc ruby/rb-rubytoc 1.0.0.5 Ruby (subset) to > C translator. > rb-technorati-ruby ruby/rb-technorati-ruby 0.1.0 > Technorati(http://technorati.com/) bindings for Ruby. > eruby www/eruby 1.0.5 Ruby embedded > into text (HTML) pages > mod_ruby www/mod_ruby 1.2.6 apache2 module > embedding the Ruby interpreter > > Scott > > >> >> >> Pat >> >> On Wed, Jun 4, 2008 at 7:59 PM, Yi Wen wrote: >>> >>> ruby --version >>> ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] >>> >>> OS is leopard, upgraded from Tiger. >>> >>> Thanks >>> >>> On Wed, Jun 4, 2008 at 9:53 PM, Pat Maddox wrote: >>>> >>>> On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen wrote: >>>>> >>>>> I cloned rspec source and try to run rake, and got 4 failures after >>>>> installing a bunch of gems. So just wonder is there any tutorial or >>>>> instruction on how to pass all specs? Thanks. >>>>> >>>>> BTW: the failures are: >>>>> >>>>> 1) >>>>> 'ExampleGroup with test/unit/interop with failing examples should >>>>> return an exit code of 256' FAILED >>>>> expected: 256, >>>>> got: # (using ==) >>>>> Diff: >>>>> @@ -1,2 +1,2 @@ >>>>> -256 >>>>> +# >>>>> >>>>> ./spec/spec/interop/test/unit/spec_spec.rb:30: >>>>> >>>>> 2) >>>>> 'ExampleGroup with test/unit/interop with example that raises an error >>>>> should return an exit code of 256' FAILED >>>>> expected: 256, >>>>> got: # (using ==) >>>>> Diff: >>>>> @@ -1,2 +1,2 @@ >>>>> -256 >>>>> +# >>>>> >>>>> ./spec/spec/interop/test/unit/spec_spec.rb:42: >>>>> >>>>> 3) >>>>> 'Test::Unit::TestCase with failing test case should return an exit >>>>> code of 256' FAILED >>>>> expected: 256, >>>>> got: # (using ==) >>>>> Diff: >>>>> @@ -1,2 +1,2 @@ >>>>> -256 >>>>> +# >>>>> >>>>> ./spec/spec/interop/test/unit/testcase_spec.rb:30: >>>>> >>>>> 4) >>>>> 'Test::Unit::TestCase with test case that raises an error should >>>>> return an exit code of 256' FAILED >>>>> expected: 256, >>>>> got: # (using ==) >>>>> Diff: >>>>> @@ -1,2 +1,2 @@ >>>>> -256 >>>>> +# >>>>> >>>>> >>>>> Yi >>>>> _______________________________________________ >>>>> rspec-devel mailing list >>>>> rspec-devel at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>>> >>>> >>>> I remember getting similar errors when I built some version of Ruby >>>> myself. It was either really old or really recent, or it was stuff >>>> with dtrace. What's the full ruby version info? >>>> >>>> Pat >>>> _______________________________________________ >>>> rspec-devel mailing list >>>> rspec-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>> >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From dchelimsky at gmail.com Thu Jun 5 06:59:28 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 5 Jun 2008 05:59:28 -0500 Subject: [rspec-devel] Tutorial In-Reply-To: References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> Message-ID: <8EE38E6D-C549-4D69-A3A6-0BA561FBAFFB@gmail.com> On Jun 5, 2008, at 1:03 AM, Yi Wen wrote: > Updated to ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-darwin9.2.2] > > Now down to 2 failures: > > 'Spec::Runner::Formatter::HtmlFormatter should produce HTML identical > to the one we designed manually with --diff' FAILED > > 'Spec::Runner::Formatter::TextMateFormatter functional spec using > --diff should produce HTML identical to the one we designed manually > with --diff' FAILED Do you have the syntax gem installed? If not, grab that. > > > Any idea? Thanks > > Yi > > On Wed, Jun 4, 2008 at 11:40 PM, Scott Taylor > wrote: >> >> On Jun 5, 2008, at 12:10 AM, Pat Maddox wrote: >> >>> Yeah, that's just too old. Upgrade your XCode / custom ruby >>> install. >> >> Actually, it looks like Darwinports now has ruby 1.8.6 patchlevel >> 114: >> >> scott-taylors-macbook:~ smt$ port search ruby >> subversion-rubybindings devel/subversion-rubybindings 1.4.6 >> Ruby bindings for the subversion version control system. >> jruby lang/jruby 1.1.1 JRuby is >> an 100% >> pure-Java implementation of the Ruby programming language. >> ruby lang/ruby 1.8.6-p114 Powerful >> and >> clean object-oriented scripting language >> ruby19 lang/ruby19 1.9.0-1 Powerful >> and >> clean object-oriented scripting language >> rb-bioruby ruby/rb-bioruby 0.6.2 >> Integrated >> environment for bioinformatics. >> rb-fxruby ruby/rb-fxruby 1.6.13 Ruby >> bindings for >> the FOX GUI Toolkit. >> rb-plruby ruby/rb-plruby 0.5.2 PL/Ruby >> for >> PostgreSQL >> rb-rubycon ruby/rb-rubycon 0.8 Toolkit >> for >> building concept processing and reasoning systems. >> rb-rubyforge ruby/rb-rubyforge 0.4.1 A >> simplistic >> script which automates a limited set of rubyforge operations >> rb-rubygems ruby/rb-rubygems 1.1.1 a >> package >> management framework for Ruby >> rb-rubyinline ruby/rb-rubyinline 3.6.2 >> Multi-language extension coding within ruby. >> rb-rubytoc ruby/rb-rubytoc 1.0.0.5 Ruby >> (subset) to >> C translator. >> rb-technorati-ruby ruby/rb-technorati-ruby 0.1.0 >> Technorati(http://technorati.com/) bindings for Ruby. >> eruby www/eruby 1.0.5 Ruby >> embedded >> into text (HTML) pages >> mod_ruby www/mod_ruby 1.2.6 apache2 >> module >> embedding the Ruby interpreter >> >> Scott >> >> >>> >>> >>> Pat >>> >>> On Wed, Jun 4, 2008 at 7:59 PM, Yi Wen wrote: >>>> >>>> ruby --version >>>> ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] >>>> >>>> OS is leopard, upgraded from Tiger. >>>> >>>> Thanks >>>> >>>> On Wed, Jun 4, 2008 at 9:53 PM, Pat Maddox >>>> wrote: >>>>> >>>>> On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen >>>>> wrote: >>>>>> >>>>>> I cloned rspec source and try to run rake, and got 4 failures >>>>>> after >>>>>> installing a bunch of gems. So just wonder is there any >>>>>> tutorial or >>>>>> instruction on how to pass all specs? Thanks. >>>>>> >>>>>> BTW: the failures are: >>>>>> >>>>>> 1) >>>>>> 'ExampleGroup with test/unit/interop with failing examples should >>>>>> return an exit code of 256' FAILED >>>>>> expected: 256, >>>>>> got: # (using ==) >>>>>> Diff: >>>>>> @@ -1,2 +1,2 @@ >>>>>> -256 >>>>>> +# >>>>>> >>>>>> ./spec/spec/interop/test/unit/spec_spec.rb:30: >>>>>> >>>>>> 2) >>>>>> 'ExampleGroup with test/unit/interop with example that raises >>>>>> an error >>>>>> should return an exit code of 256' FAILED >>>>>> expected: 256, >>>>>> got: # (using ==) >>>>>> Diff: >>>>>> @@ -1,2 +1,2 @@ >>>>>> -256 >>>>>> +# >>>>>> >>>>>> ./spec/spec/interop/test/unit/spec_spec.rb:42: >>>>>> >>>>>> 3) >>>>>> 'Test::Unit::TestCase with failing test case should return an >>>>>> exit >>>>>> code of 256' FAILED >>>>>> expected: 256, >>>>>> got: # (using ==) >>>>>> Diff: >>>>>> @@ -1,2 +1,2 @@ >>>>>> -256 >>>>>> +# >>>>>> >>>>>> ./spec/spec/interop/test/unit/testcase_spec.rb:30: >>>>>> >>>>>> 4) >>>>>> 'Test::Unit::TestCase with test case that raises an error should >>>>>> return an exit code of 256' FAILED >>>>>> expected: 256, >>>>>> got: # (using ==) >>>>>> Diff: >>>>>> @@ -1,2 +1,2 @@ >>>>>> -256 >>>>>> +# >>>>>> >>>>>> >>>>>> Yi >>>>>> _______________________________________________ >>>>>> rspec-devel mailing list >>>>>> rspec-devel at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>>>> >>>>> >>>>> I remember getting similar errors when I built some version of >>>>> Ruby >>>>> myself. It was either really old or really recent, or it was >>>>> stuff >>>>> with dtrace. What's the full ruby version info? >>>>> >>>>> Pat >>>>> _______________________________________________ >>>>> rspec-devel mailing list >>>>> rspec-devel at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>>> >>>> _______________________________________________ >>>> rspec-devel mailing list >>>> rspec-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>> >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From hayafirst at gmail.com Thu Jun 5 10:11:27 2008 From: hayafirst at gmail.com (Yi Wen) Date: Thu, 5 Jun 2008 09:11:27 -0500 Subject: [rspec-devel] Tutorial In-Reply-To: <8EE38E6D-C549-4D69-A3A6-0BA561FBAFFB@gmail.com> References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> <8EE38E6D-C549-4D69-A3A6-0BA561FBAFFB@gmail.com> Message-ID: Thanks all. I raked on my Linux box and all specs passed. I guess just a couple more gems needed on my MBP to get it passing. :) Now the build still fails because the coverage was 88.6%. Is this correct? Thanks again. Yi On Thu, Jun 5, 2008 at 5:59 AM, David Chelimsky wrote: > > On Jun 5, 2008, at 1:03 AM, Yi Wen wrote: > >> Updated to ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-darwin9.2.2] >> >> Now down to 2 failures: >> >> 'Spec::Runner::Formatter::HtmlFormatter should produce HTML identical >> to the one we designed manually with --diff' FAILED >> >> 'Spec::Runner::Formatter::TextMateFormatter functional spec using >> --diff should produce HTML identical to the one we designed manually >> with --diff' FAILED > > Do you have the syntax gem installed? If not, grab that. > >> >> >> Any idea? Thanks >> >> Yi >> >> On Wed, Jun 4, 2008 at 11:40 PM, Scott Taylor >> wrote: >>> >>> On Jun 5, 2008, at 12:10 AM, Pat Maddox wrote: >>> >>>> Yeah, that's just too old. Upgrade your XCode / custom ruby install. >>> >>> Actually, it looks like Darwinports now has ruby 1.8.6 patchlevel 114: >>> >>> scott-taylors-macbook:~ smt$ port search ruby >>> subversion-rubybindings devel/subversion-rubybindings 1.4.6 >>> Ruby bindings for the subversion version control system. >>> jruby lang/jruby 1.1.1 JRuby is an >>> 100% >>> pure-Java implementation of the Ruby programming language. >>> ruby lang/ruby 1.8.6-p114 Powerful and >>> clean object-oriented scripting language >>> ruby19 lang/ruby19 1.9.0-1 Powerful and >>> clean object-oriented scripting language >>> rb-bioruby ruby/rb-bioruby 0.6.2 Integrated >>> environment for bioinformatics. >>> rb-fxruby ruby/rb-fxruby 1.6.13 Ruby bindings >>> for >>> the FOX GUI Toolkit. >>> rb-plruby ruby/rb-plruby 0.5.2 PL/Ruby for >>> PostgreSQL >>> rb-rubycon ruby/rb-rubycon 0.8 Toolkit for >>> building concept processing and reasoning systems. >>> rb-rubyforge ruby/rb-rubyforge 0.4.1 A >>> simplistic >>> script which automates a limited set of rubyforge operations >>> rb-rubygems ruby/rb-rubygems 1.1.1 a package >>> management framework for Ruby >>> rb-rubyinline ruby/rb-rubyinline 3.6.2 >>> Multi-language extension coding within ruby. >>> rb-rubytoc ruby/rb-rubytoc 1.0.0.5 Ruby (subset) >>> to >>> C translator. >>> rb-technorati-ruby ruby/rb-technorati-ruby 0.1.0 >>> Technorati(http://technorati.com/) bindings for Ruby. >>> eruby www/eruby 1.0.5 Ruby embedded >>> into text (HTML) pages >>> mod_ruby www/mod_ruby 1.2.6 apache2 module >>> embedding the Ruby interpreter >>> >>> Scott >>> >>> >>>> >>>> >>>> Pat >>>> >>>> On Wed, Jun 4, 2008 at 7:59 PM, Yi Wen wrote: >>>>> >>>>> ruby --version >>>>> ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.3] >>>>> >>>>> OS is leopard, upgraded from Tiger. >>>>> >>>>> Thanks >>>>> >>>>> On Wed, Jun 4, 2008 at 9:53 PM, Pat Maddox wrote: >>>>>> >>>>>> On Wed, Jun 4, 2008 at 12:15 PM, Yi Wen wrote: >>>>>>> >>>>>>> I cloned rspec source and try to run rake, and got 4 failures after >>>>>>> installing a bunch of gems. So just wonder is there any tutorial or >>>>>>> instruction on how to pass all specs? Thanks. >>>>>>> >>>>>>> BTW: the failures are: >>>>>>> >>>>>>> 1) >>>>>>> 'ExampleGroup with test/unit/interop with failing examples should >>>>>>> return an exit code of 256' FAILED >>>>>>> expected: 256, >>>>>>> got: # (using ==) >>>>>>> Diff: >>>>>>> @@ -1,2 +1,2 @@ >>>>>>> -256 >>>>>>> +# >>>>>>> >>>>>>> ./spec/spec/interop/test/unit/spec_spec.rb:30: >>>>>>> >>>>>>> 2) >>>>>>> 'ExampleGroup with test/unit/interop with example that raises an >>>>>>> error >>>>>>> should return an exit code of 256' FAILED >>>>>>> expected: 256, >>>>>>> got: # (using ==) >>>>>>> Diff: >>>>>>> @@ -1,2 +1,2 @@ >>>>>>> -256 >>>>>>> +# >>>>>>> >>>>>>> ./spec/spec/interop/test/unit/spec_spec.rb:42: >>>>>>> >>>>>>> 3) >>>>>>> 'Test::Unit::TestCase with failing test case should return an exit >>>>>>> code of 256' FAILED >>>>>>> expected: 256, >>>>>>> got: # (using ==) >>>>>>> Diff: >>>>>>> @@ -1,2 +1,2 @@ >>>>>>> -256 >>>>>>> +# >>>>>>> >>>>>>> ./spec/spec/interop/test/unit/testcase_spec.rb:30: >>>>>>> >>>>>>> 4) >>>>>>> 'Test::Unit::TestCase with test case that raises an error should >>>>>>> return an exit code of 256' FAILED >>>>>>> expected: 256, >>>>>>> got: # (using ==) >>>>>>> Diff: >>>>>>> @@ -1,2 +1,2 @@ >>>>>>> -256 >>>>>>> +# >>>>>>> >>>>>>> >>>>>>> Yi >>>>>>> _______________________________________________ >>>>>>> rspec-devel mailing list >>>>>>> rspec-devel at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>>>>> >>>>>> >>>>>> I remember getting similar errors when I built some version of Ruby >>>>>> myself. It was either really old or really recent, or it was stuff >>>>>> with dtrace. What's the full ruby version info? >>>>>> >>>>>> Pat >>>>>> _______________________________________________ >>>>>> rspec-devel mailing list >>>>>> rspec-devel at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>>>> >>>>> _______________________________________________ >>>>> rspec-devel mailing list >>>>> rspec-devel at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>>>> >>>> _______________________________________________ >>>> rspec-devel mailing list >>>> rspec-devel at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From dchelimsky at gmail.com Thu Jun 5 10:28:28 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 5 Jun 2008 09:28:28 -0500 Subject: [rspec-devel] Tutorial In-Reply-To: References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> <8EE38E6D-C549-4D69-A3A6-0BA561FBAFFB@gmail.com> Message-ID: On Jun 5, 2008, at 9:11 AM, Yi Wen wrote: > Thanks all. I raked on my Linux box and all specs passed. I guess just > a couple more gems needed on my MBP to get it passing. :) > > Now the build still fails because the coverage was 88.6%. Is this > correct? No. Should be getting 100% coverage. From hayafirst at gmail.com Fri Jun 6 13:18:11 2008 From: hayafirst at gmail.com (Yi Wen) Date: Fri, 6 Jun 2008 12:18:11 -0500 Subject: [rspec-devel] Tutorial In-Reply-To: References: <810a540e0806041953n6cd78076lac4cc74e5b0cef0a@mail.gmail.com> <810a540e0806042110j48695bdaof9ef6c23b67c3d21@mail.gmail.com> <8A50362A-0CA4-41F4-9219-1C2374F9DE22@railsnewbie.com> <8EE38E6D-C549-4D69-A3A6-0BA561FBAFFB@gmail.com> Message-ID: 3 files that are not having 100% coverage are: /usr/local/lib/site_ruby/1.8/rcov.rb lib/spec/adapters.rb 3.3%, and lib/spec/adapters/ruby_engine/mri.rb On Thu, Jun 5, 2008 at 9:28 AM, David Chelimsky wrote: > On Jun 5, 2008, at 9:11 AM, Yi Wen wrote: > >> Thanks all. I raked on my Linux box and all specs passed. I guess just >> a couple more gems needed on my MBP to get it passing. :) >> >> Now the build still fails because the coverage was 88.6%. Is this >> correct? > > No. Should be getting 100% coverage. > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From weexpectedthis at gmail.com Fri Jun 6 16:21:29 2008 From: weexpectedthis at gmail.com (weexpectedthis) Date: Fri, 6 Jun 2008 13:21:29 -0700 (PDT) Subject: [rspec-devel] Rspec blowing away my initial data Message-ID: <17697155.post@talk.nabble.com> I have this code in the only migration I have in my app: create_table :states do |generic_table| generic_table.with_options :null => false do |t| t.string :name t.datetime :created_at, :updated_at end end State.create!(:name => 'New') State.create!(:name => 'Submitting') State.create!(:name => 'Reviewing') State.create!(:name => 'Implementing') State.create!(:name => 'Finished') When I run `rake test` it builds my test database with the migration I have correctly. But then when I run `rake spec` and look at the database, the initial data (all of the States) are missing. So my questions are: 1) Does rspec blow away my initial data before it runs tests? 2) How can I get it to stop doing that? -- View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17697155.html Sent from the rspec-devel mailing list archive at Nabble.com. From mauricio.linhares at gmail.com Fri Jun 6 16:31:42 2008 From: mauricio.linhares at gmail.com (=?ISO-8859-1?Q?Maur=EDcio_Linhares?=) Date: Fri, 6 Jun 2008 17:31:42 -0300 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: <17697155.post@talk.nabble.com> References: <17697155.post@talk.nabble.com> Message-ID: This isn't an rspec feature, every time you run your rails app tests it will drop the whole database and rebuild it again (based on the development database) but only the structure will be copied, no data will be copied and no migrations are run. If you want to add test data to your specs you should use fixtures instead or just add your data in a "before" block and remove it in an "after" block. On Fri, Jun 6, 2008 at 5:21 PM, weexpectedthis wrote: > > I have this code in the only migration I have in my app: > > create_table :states do |generic_table| > generic_table.with_options :null => false do |t| > t.string :name > t.datetime :created_at, :updated_at > end > end > > State.create!(:name => 'New') > State.create!(:name => 'Submitting') > State.create!(:name => 'Reviewing') > State.create!(:name => 'Implementing') > State.create!(:name => 'Finished') > > When I run `rake test` it builds my test database with the migration I have > correctly. But then when I run `rake spec` and look at the database, the > initial data (all of the States) are missing. > > So my questions are: > 1) Does rspec blow away my initial data before it runs tests? > > 2) How can I get it to stop doing that? -- Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) Jo?o Pessoa, PB, +55 83 8867-7208 From weexpectedthis at gmail.com Fri Jun 6 16:45:24 2008 From: weexpectedthis at gmail.com (weexpectedthis) Date: Fri, 6 Jun 2008 13:45:24 -0700 (PDT) Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: References: <17697155.post@talk.nabble.com> Message-ID: <17700821.post@talk.nabble.com> Fixtures are evil, at least in my opinion. And this isn't data I want loaded in each test, it's data that is basically storing constants in my database. I need this to be in the migration, but I don't want to have to enter the data in the migration and in a fixture as well. -Kyle Maur?cio Linhares-3 wrote: > > This isn't an rspec feature, every time you run your rails app tests > it will drop the whole database and rebuild it again (based on the > development database) but only the structure will be copied, no data > will be copied and no migrations are run. > > If you want to add test data to your specs you should use fixtures > instead or just add your data in a "before" block and remove it in an > "after" block. > -- View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17700821.html Sent from the rspec-devel mailing list archive at Nabble.com. From bryansray at gmail.com Fri Jun 6 16:49:26 2008 From: bryansray at gmail.com (Bryan Ray) Date: Fri, 6 Jun 2008 15:49:26 -0500 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: <17700821.post@talk.nabble.com> References: <17697155.post@talk.nabble.com> <17700821.post@talk.nabble.com> Message-ID: <60FAAF6D-F829-4E44-9D7B-FA3A063E8A60@gmail.com> Just copy the code out of the migration and in to a before block? Could probably just generate a YAML file using to_yaml as well ... should be fairly simple. Then just drop it in your spec/fixtures On Jun 6, 2008, at 3:45 PM, weexpectedthis wrote: > > Fixtures are evil, at least in my opinion. And this isn't data I > want loaded > in each test, it's data that is basically storing constants in my > database. > I need this to be in the migration, but I don't want to have to > enter the > data in the migration and in a fixture as well. > > -Kyle > > > Maur?cio Linhares-3 wrote: >> >> This isn't an rspec feature, every time you run your rails app tests >> it will drop the whole database and rebuild it again (based on the >> development database) but only the structure will be copied, no data >> will be copied and no migrations are run. >> >> If you want to add test data to your specs you should use fixtures >> instead or just add your data in a "before" block and remove it in an >> "after" block. >> > > -- > View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17700821.html > Sent from the rspec-devel mailing list archive at Nabble.com. > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From mauricio.linhares at gmail.com Fri Jun 6 16:51:08 2008 From: mauricio.linhares at gmail.com (=?ISO-8859-1?Q?Maur=EDcio_Linhares?=) Date: Fri, 6 Jun 2008 17:51:08 -0300 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: <60FAAF6D-F829-4E44-9D7B-FA3A063E8A60@gmail.com> References: <17697155.post@talk.nabble.com> <17700821.post@talk.nabble.com> <60FAAF6D-F829-4E44-9D7B-FA3A063E8A60@gmail.com> Message-ID: Or create the fixtures file and load them in the migration and in rspec -> http://blog.zmok.net/articles/2007/05/29/loading-data-in-migrations On Fri, Jun 6, 2008 at 5:49 PM, Bryan Ray wrote: > Just copy the code out of the migration and in to a before block? > > Could probably just generate a YAML file using to_yaml as well ... should be > fairly simple. Then just drop it in your spec/fixtures > -- Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) Jo?o Pessoa, PB, +55 83 8867-7208 From hayafirst at gmail.com Fri Jun 6 17:02:53 2008 From: hayafirst at gmail.com (Yi Wen) Date: Fri, 6 Jun 2008 16:02:53 -0500 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: <17700821.post@talk.nabble.com> References: <17697155.post@talk.nabble.com> <17700821.post@talk.nabble.com> Message-ID: Yes, it is exactly my situation. All I can do is to write a rake task on my own to run all specs without destroying the db first (instead, do rake db:migrate:reset) On Fri, Jun 6, 2008 at 3:45 PM, weexpectedthis wrote: > > Fixtures are evil, at least in my opinion. And this isn't data I want loaded > in each test, it's data that is basically storing constants in my database. > I need this to be in the migration, but I don't want to have to enter the > data in the migration and in a fixture as well. > > -Kyle > > > Maur?cio Linhares-3 wrote: >> >> This isn't an rspec feature, every time you run your rails app tests >> it will drop the whole database and rebuild it again (based on the >> development database) but only the structure will be copied, no data >> will be copied and no migrations are run. >> >> If you want to add test data to your specs you should use fixtures >> instead or just add your data in a "before" block and remove it in an >> "after" block. >> > > -- > View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17700821.html > Sent from the rspec-devel mailing list archive at Nabble.com. > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From pergesu at gmail.com Fri Jun 6 17:13:23 2008 From: pergesu at gmail.com (Pat Maddox) Date: Fri, 6 Jun 2008 14:13:23 -0700 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: References: <17697155.post@talk.nabble.com> <17700821.post@talk.nabble.com> Message-ID: <810a540e0806061413y2f15e2e0u837e5d74e2afcc2f@mail.gmail.com> You could change the tasks to use db:migrate instead of dropping the db. Pat On Fri, Jun 6, 2008 at 2:02 PM, Yi Wen wrote: > Yes, it is exactly my situation. All I can do is to write a rake task > on my own to run all specs without destroying the db first (instead, > do rake db:migrate:reset) > > On Fri, Jun 6, 2008 at 3:45 PM, weexpectedthis wrote: >> >> Fixtures are evil, at least in my opinion. And this isn't data I want loaded >> in each test, it's data that is basically storing constants in my database. >> I need this to be in the migration, but I don't want to have to enter the >> data in the migration and in a fixture as well. >> >> -Kyle >> >> >> Maur?cio Linhares-3 wrote: >>> >>> This isn't an rspec feature, every time you run your rails app tests >>> it will drop the whole database and rebuild it again (based on the >>> development database) but only the structure will be copied, no data >>> will be copied and no migrations are run. >>> >>> If you want to add test data to your specs you should use fixtures >>> instead or just add your data in a "before" block and remove it in an >>> "after" block. >>> >> >> -- >> View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17700821.html >> Sent from the rspec-devel mailing list archive at Nabble.com. >> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From hayafirst at gmail.com Fri Jun 6 17:25:27 2008 From: hayafirst at gmail.com (Yi Wen) Date: Fri, 6 Jun 2008 16:25:27 -0500 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: <810a540e0806061413y2f15e2e0u837e5d74e2afcc2f@mail.gmail.com> References: <17697155.post@talk.nabble.com> <17700821.post@talk.nabble.com> <810a540e0806061413y2f15e2e0u837e5d74e2afcc2f@mail.gmail.com> Message-ID: I didn't always follow Rails convention by keep adding scripts. I just change existing scripts when needed. I do this when I don't have to worry about the production yet. :) That's why db:migrate:reset is needed. On Fri, Jun 6, 2008 at 4:13 PM, Pat Maddox wrote: > You could change the tasks to use db:migrate instead of dropping the db. > > Pat > > > On Fri, Jun 6, 2008 at 2:02 PM, Yi Wen wrote: >> Yes, it is exactly my situation. All I can do is to write a rake task >> on my own to run all specs without destroying the db first (instead, >> do rake db:migrate:reset) >> On Fri, Jun 6, 2008 at 3:45 PM, weexpectedthis wrote: >>> >>> Fixtures are evil, at least in my opinion. And this isn't data I want loaded >>> in each test, it's data that is basically storing constants in my database. >>> I need this to be in the migration, but I don't want to have to enter the >>> data in the migration and in a fixture as well. >>> >>> -Kyle >>> >>> >>> Maur?cio Linhares-3 wrote: >>>> >>>> This isn't an rspec feature, every time you run your rails app tests >>>> it will drop the whole database and rebuild it again (based on the >>>> development database) but only the structure will be copied, no data >>>> will be copied and no migrations are run. >>>> >>>> If you want to add test data to your specs you should use fixtures >>>> instead or just add your data in a "before" block and remove it in an >>>> "after" block. >>>> >>> >>> -- >>> View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17700821.html >>> Sent from the rspec-devel mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-devel >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From mailing_lists at railsnewbie.com Fri Jun 6 20:52:01 2008 From: mailing_lists at railsnewbie.com (Scott Taylor) Date: Fri, 6 Jun 2008 20:52:01 -0400 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: References: <17697155.post@talk.nabble.com> Message-ID: On Jun 6, 2008, at 4:31 PM, Maur?cio Linhares wrote: > This isn't an rspec feature, every time you run your rails app tests > it will drop the whole database and rebuild it again (based on the > development database) but only the structure will be copied, no data > will be copied and no migrations are run. > > If you want to add test data to your specs you should use fixtures > instead or just add your data in a "before" block and remove it in an > "after" block. > Actually, you won't need to destroy it in the after block as long as you have transactional_fixtures = false in spec_helper.rb Scott > On Fri, Jun 6, 2008 at 5:21 PM, weexpectedthis > wrote: >> >> I have this code in the only migration I have in my app: >> >> create_table :states do |generic_table| >> generic_table.with_options :null => false do |t| >> t.string :name >> t.datetime :created_at, :updated_at >> end >> end >> >> State.create!(:name => 'New') >> State.create!(:name => 'Submitting') >> State.create!(:name => 'Reviewing') >> State.create!(:name => 'Implementing') >> State.create!(:name => 'Finished') >> >> When I run `rake test` it builds my test database with the >> migration I have >> correctly. But then when I run `rake spec` and look at the >> database, the >> initial data (all of the States) are missing. >> >> So my questions are: >> 1) Does rspec blow away my initial data before it runs tests? >> >> 2) How can I get it to stop doing that? > > > > -- > Maur?cio Linhares > http://alinhavado.wordpress.com/ (pt-br) | http:// > blog.codevader.com/ (en) > Jo?o Pessoa, PB, +55 83 8867-7208 > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From cdemyanovich at gmail.com Sat Jun 7 17:16:33 2008 From: cdemyanovich at gmail.com (Craig Demyanovich) Date: Sat, 7 Jun 2008 17:16:33 -0400 Subject: [rspec-devel] Rspec blowing away my initial data In-Reply-To: References: <17697155.post@talk.nabble.com> Message-ID: <61c885db0806071416m3e186585v695231a67aa63060@mail.gmail.com> The State data looks like seed data, data that the application depends on to run (as opposed to data created by use of the application). seed_fu [ http://www.intridea.com/2008/4/20/seed-fu-simple-seed-data-for-rails ] could help, as could some of the choices that the seed_fu article links to. Regards, Craig From bryansray at gmail.com Sun Jun 8 16:35:35 2008 From: bryansray at gmail.com (Bryan Ray) Date: Sun, 8 Jun 2008 15:35:35 -0500 Subject: [rspec-devel] User Story Samples Message-ID: <29a0119e0806081335j19162016o95fee0327bd01dee@mail.gmail.com> Does anyone have a link to a fairly small project that has "up-to-date" implementations of the Story Runner? I'm trying to get familiarized with it and I'm not having much luck finding resources ... I've seen the tutorials and they all seem to refer to the "older" (1.1.1) patterns used for rails integration tests. Thanks, guys. -- Bryan Ray http://www.bryanray.net "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -------------- next part -------------- An HTML attachment was scrubbed... URL: From zach.dennis at gmail.com Thu Jun 12 23:19:09 2008 From: zach.dennis at gmail.com (Zach Dennis) Date: Thu, 12 Jun 2008 23:19:09 -0400 Subject: [rspec-devel] User Story Samples In-Reply-To: <29a0119e0806081335j19162016o95fee0327bd01dee@mail.gmail.com> References: <29a0119e0806081335j19162016o95fee0327bd01dee@mail.gmail.com> Message-ID: <85d99afe0806122019l4c2d9cebg35aa184399f934c4@mail.gmail.com> You could look at http://github.com/mvanholstyn/strac/tree/master . It has old and recent usages of Stories. Just look for files that have been modified in the past few weeks for the most recent usages. For example stories/project_iterations. Step files are stored in stories/steps/project_iterations/ Zach On Sun, Jun 8, 2008 at 4:35 PM, Bryan Ray wrote: > Does anyone have a link to a fairly small project that has "up-to-date" > implementations of the Story Runner? I'm trying to get familiarized with it > and I'm not having much luck finding resources ... > I've seen the tutorials and they all seem to refer to the "older" (1.1.1) > patterns used for rails integration tests. > > Thanks, guys. > > -- > Bryan Ray > http://www.bryanray.net > > "Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning." > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Zach Dennis http://www.continuousthinking.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanholstyn at gmail.com Sun Jun 15 16:23:29 2008 From: mvanholstyn at gmail.com (Mark Van Holstyn) Date: Sun, 15 Jun 2008 16:23:29 -0400 Subject: [rspec-devel] Patch to make helper specs more consistent In-Reply-To: References: <810a540e0806041432u227c9ef8q7d69c2688b457579@mail.gmail.com> Message-ID: It looks like my ticket got marked as spam and is not showing up in any reports. Can we get this unmarked as spam? Mark On Wed, Jun 4, 2008 at 5:33 PM, Mark Van Holstyn wrote: > Good to know! I will let the internet take care of this for me in the > future :) > > Mark > > > On Wed, Jun 4, 2008 at 5:32 PM, Pat Maddox wrote: > >> On Wed, Jun 4, 2008 at 11:26 AM, Mark Van Holstyn >> wrote: >> > Anyone have time to review >> > >> http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/426-make-helper-specs-more-consistent >> ? >> >> Hey Mark, >> >> Thanks for the patch. Tickets show up in lighthouse, and I subscribe >> to the RSS feed (as I'm sure others do), so we do see them. In the >> future, it's not necessary to send a message to the mailing list. >> >> Pat >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > > > > -- > Mark Van Holstyn, Partner / Software Developer > mvanholstyn at mutuallyhuman.com, (616) 706-6842 > Mutually Human Software, http://mutuallyhuman.com > -- Mark Van Holstyn, Partner / Software Developer mvanholstyn at mutuallyhuman.com, (616) 706-6842 Mutually Human Software, http://mutuallyhuman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrytheliquid at gmail.com Mon Jun 16 23:30:45 2008 From: larrytheliquid at gmail.com (Larrytheliquid) Date: Mon, 16 Jun 2008 23:30:45 -0400 Subject: [rspec-devel] ExampleGroupRunner VS BehaviorRunner Message-ID: In Spec::Runner::ExampleGroupRunner, this code exists: # TODO: BT - Deprecate BehaviourRunner? BehaviourRunner = ExampleGroupRunner Does this mean ExampleGroupRunner is what is being used going forward, and BehaviorRunner is for backwards compatibility? -- Respectfully, Larry Diehl www.larrytheliquid.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dchelimsky at gmail.com Tue Jun 17 06:45:18 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 17 Jun 2008 05:45:18 -0500 Subject: [rspec-devel] ExampleGroupRunner VS BehaviorRunner In-Reply-To: References: Message-ID: <57c63afe0806170345m62a341c3wdbce55ba2a5a54ce@mail.gmail.com> On Mon, Jun 16, 2008 at 10:30 PM, Larrytheliquid wrote: > In Spec::Runner::ExampleGroupRunner, this code exists: > > # TODO: BT - Deprecate BehaviourRunner? > BehaviourRunner = ExampleGroupRunner > > Does this mean ExampleGroupRunner is what is being used going forward, and > BehaviorRunner is for backwards compatibility? Yes. > > -- > Respectfully, > Larry Diehl > www.larrytheliquid.com > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From dchelimsky at gmail.com Sat Jun 21 12:55:54 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Sat, 21 Jun 2008 11:55:54 -0500 Subject: [rspec-devel] crazy semantic question Message-ID: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> Help please. I'm struggling to find the right word. Here are some statements - can you fill in the ???: The sign of +1 is positive. The sign of -1 is negative. The polarity of this magnet is positive. The polarity of that magnet is negative. The ??? of the expression "x should y" is positive. The ??? of the expression "x should not y" is negative. I've already ruled out 'should-ness' :) Cheers, David From deanwampler at gmail.com Sat Jun 21 13:02:23 2008 From: deanwampler at gmail.com (Dean Wampler) Date: Sat, 21 Jun 2008 12:02:23 -0500 Subject: [rspec-devel] crazy semantic question In-Reply-To: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> Message-ID: <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> How about: The sense of the expression "x should y" is positive. The sense of the expression "x should not y" is negative. dean On Sat, Jun 21, 2008 at 11:55 AM, David Chelimsky wrote: > Help please. I'm struggling to find the right word. Here are some > statements - can you fill in the ???: > > The sign of +1 is positive. > The sign of -1 is negative. > > The polarity of this magnet is positive. > The polarity of that magnet is negative. > > The ??? of the expression "x should y" is positive. > The ??? of the expression "x should not y" is negative. > > I've already ruled out 'should-ness' :) > > Cheers, > David > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Dean Wampler http://www.objectmentor.com http://www.aspectprogramming.com http://aquarium.rubyforge.org http://www.contract4j.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dchelimsky at gmail.com Sat Jun 21 13:03:37 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Sat, 21 Jun 2008 12:03:37 -0500 Subject: [rspec-devel] crazy semantic question In-Reply-To: <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> Message-ID: <57c63afe0806211003p738bb725g635c7b3c1dd12f6@mail.gmail.com> On Sat, Jun 21, 2008 at 12:02 PM, Dean Wampler wrote: > How about: > The sense of the expression "x should y" is positive. > The sense of the expression "x should not y" is negative. Best one so far :) Thanks! Keep 'em coming. > > dean > On Sat, Jun 21, 2008 at 11:55 AM, David Chelimsky > wrote: >> >> Help please. I'm struggling to find the right word. Here are some >> statements - can you fill in the ???: >> >> The sign of +1 is positive. >> The sign of -1 is negative. >> >> The polarity of this magnet is positive. >> The polarity of that magnet is negative. >> >> The ??? of the expression "x should y" is positive. >> The ??? of the expression "x should not y" is negative. >> >> I've already ruled out 'should-ness' :) >> >> Cheers, >> David >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel > > > > -- > Dean Wampler > http://www.objectmentor.com > http://www.aspectprogramming.com > http://aquarium.rubyforge.org > http://www.contract4j.org > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > From bryansray at gmail.com Sat Jun 21 15:37:06 2008 From: bryansray at gmail.com (Bryan Ray) Date: Sat, 21 Jun 2008 14:37:06 -0500 Subject: [rspec-devel] crazy semantic question In-Reply-To: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> Message-ID: <9DE05FA3-3EA7-4475-A2E0-A312D52D9A4D@gmail.com> likeliness? likelihood? unlikeliness? unlikelihood? perhaps im not fully understanding though. I never was good at these type things in high school. Sent from my iPhone On Jun 21, 2008, at 11:55 AM, David Chelimsky wrote: > Help please. I'm struggling to find the right word. Here are some > statements - can you fill in the ???: > > The sign of +1 is positive. > The sign of -1 is negative. > > The polarity of this magnet is positive. > The polarity of that magnet is negative. > > The ??? of the expression "x should y" is positive. > The ??? of the expression "x should not y" is negative. > > I've already ruled out 'should-ness' :) > > Cheers, > David > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From deanwampler at gmail.com Sat Jun 21 16:45:37 2008 From: deanwampler at gmail.com (Dean Wampler) Date: Sat, 21 Jun 2008 15:45:37 -0500 Subject: [rspec-devel] crazy semantic question In-Reply-To: <57c63afe0806211003p738bb725g635c7b3c1dd12f6@mail.gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> <57c63afe0806211003p738bb725g635c7b3c1dd12f6@mail.gmail.com> Message-ID: <6cf2a94f0806211345x6e57d3a6pacf3f11e81936c65@mail.gmail.com> Also maybe The tone of the expression "x should y" is positive. The tone of the expression "x should not y" is negative. I suggested "sense" because I believe that's sort of the mathematical ... um... sense! dean On Sat, Jun 21, 2008 at 12:03 PM, David Chelimsky wrote: > On Sat, Jun 21, 2008 at 12:02 PM, Dean Wampler > wrote: > > How about: > > The sense of the expression "x should y" is positive. > > The sense of the expression "x should not y" is negative. > > Best one so far :) > > Thanks! Keep 'em coming. > > > > > dean > > On Sat, Jun 21, 2008 at 11:55 AM, David Chelimsky > > wrote: > >> > >> Help please. I'm struggling to find the right word. Here are some > >> statements - can you fill in the ???: > >> > >> The sign of +1 is positive. > >> The sign of -1 is negative. > >> > >> The polarity of this magnet is positive. > >> The polarity of that magnet is negative. > >> > >> The ??? of the expression "x should y" is positive. > >> The ??? of the expression "x should not y" is negative. > >> > >> I've already ruled out 'should-ness' :) > >> > >> Cheers, > >> David > >> _______________________________________________ > >> rspec-devel mailing list > >> rspec-devel at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > > > > -- > > Dean Wampler > > http://www.objectmentor.com > > http://www.aspectprogramming.com > > http://aquarium.rubyforge.org > > http://www.contract4j.org > > _______________________________________________ > > 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 > -- Dean Wampler http://www.objectmentor.com http://www.aspectprogramming.com http://aquarium.rubyforge.org http://www.contract4j.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at jwhitmire.com Sat Jun 21 19:46:14 2008 From: jeff at jwhitmire.com (Jeff Whitmire) Date: Sat, 21 Jun 2008 19:46:14 -0400 Subject: [rspec-devel] crazy semantic question In-Reply-To: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> Message-ID: <45c4ccc30806211646uc9e23f1k200806ad005d3075@mail.gmail.com> signicality? Just kidding, I like tone which has already been suggested. A look at a thesaurus also yielded: mood, feeling, aura, timbre. Not sure I like any of those better than tone though. Jeff. On Sat, Jun 21, 2008 at 12:55 PM, David Chelimsky wrote: > Help please. I'm struggling to find the right word. Here are some > statements - can you fill in the ???: > > The sign of +1 is positive. > The sign of -1 is negative. > > The polarity of this magnet is positive. > The polarity of that magnet is negative. > > The ??? of the expression "x should y" is positive. > The ??? of the expression "x should not y" is negative. > > I've already ruled out 'should-ness' :) > > Cheers, > David > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -- Arnold Schwarzenegger - "I have a love interest in every one of my films - a gun." -------------- next part -------------- An HTML attachment was scrubbed... URL: From zach.dennis at gmail.com Sun Jun 22 13:25:54 2008 From: zach.dennis at gmail.com (Zach Dennis) Date: Sun, 22 Jun 2008 13:25:54 -0400 Subject: [rspec-devel] Inverse Thinking, describing behaviors with contexts rather than in contexts Message-ID: <85d99afe0806221025v67773e1dm24751d480b8f60ee@mail.gmail.com> Two friday's ago I was talking to my pair Cabout a pet peeve I have sometimes. Grouping behaviors by contexts, rather then the inverse. So I ask you, in regards to describing behavior in a particular context, have you ever entertained the idea of the describing behavior with a particular context? For example here is an example of describing behavior inside of a context: describe Trip context "with no breakfast expenses" it "has $0 for breakfast amount" end context "with breakfast expenses" do it "has a breakfast amount which is the sum total of breakfast expenses" end end And here's an example of describing the behavior with contexts: describe Trip behavior "computes breakfast amount" do context "with no breakfast expenses" do it "is $0" end context "with breakfast expenses" do it "is the sum of all breakfast expenses" end end end The difference is subtle, but it inverts how behaviors are described. It also groups contexts for a particular behavior together, rather than grouping the behaviors to a particular context. It does add another level of verbosity, but it makes my contexts more meaningful because the setup is directly tied to the behavior I'm testing, rather than potentially many behaviors which rely on the same setup. I'm just thinking out loud at this point, but I'm interested in hearing your thoughts. -- Zach Dennis http://www.continuousthinking.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dchelimsky at gmail.com Sun Jun 22 13:56:01 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Sun, 22 Jun 2008 12:56:01 -0500 Subject: [rspec-devel] Inverse Thinking, describing behaviors with contexts rather than in contexts In-Reply-To: <85d99afe0806221025v67773e1dm24751d480b8f60ee@mail.gmail.com> References: <85d99afe0806221025v67773e1dm24751d480b8f60ee@mail.gmail.com> Message-ID: <931BC50E-CBC8-4BD4-9824-FD7D917E37A5@gmail.com> On Jun 22, 2008, at 12:25 PM, Zach Dennis wrote: > Two friday's ago I was talking to my pair Cabout a pet peeve I have > sometimes. Grouping behaviors by contexts, rather then the inverse. > > So I ask you, in regards to describing behavior in a particular > context, have you ever entertained the idea of the describing > behavior with a particular context? > > For example here is an example of describing behavior inside of a > context: > > describe Trip > context "with no breakfast expenses" > it "has $0 for breakfast amount" > end > > context "with breakfast expenses" do > it "has a breakfast amount which is the sum total of breakfast > expenses" > end > end > > And here's an example of describing the behavior with contexts: > > describe Trip > behavior "computes breakfast amount" do > context "with no breakfast expenses" do > it "is $0" > end > > context "with breakfast expenses" do > it "is the sum of all breakfast expenses" > end > end > end > > The difference is subtle, but it inverts how behaviors are > described. It also groups contexts for a particular behavior > together, rather than grouping the behaviors to a particular context. > > It does add another level of verbosity, but it makes my contexts > more meaningful because the setup is directly tied to the behavior > I'm testing, rather than potentially many behaviors which rely on > the same setup. > > I'm just thinking out loud at this point, but I'm interested in > hearing your thoughts. Bravo! That's my initial thought. This all makes sense to me, though there are pros and cons. If you're a fan of common setup, this won't work too well. If you're a fan of organization/layout for communication, this seems to make sense. I'm not ready to add behaviour as an alias for context/describe/ example_group just yet, but I'd say you should do so in your projects - and feel free to write about this in your chapters - just be sure to point out both approaches and the pros/cons of each. Good? From linojon at gmail.com Sun Jun 22 15:43:47 2008 From: linojon at gmail.com (linojon) Date: Sun, 22 Jun 2008 15:43:47 -0400 Subject: [rspec-devel] crazy semantic question In-Reply-To: <9DE05FA3-3EA7-4475-A2E0-A312D52D9A4D@gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> <9DE05FA3-3EA7-4475-A2E0-A312D52D9A4D@gmail.com> Message-ID: <87D372C4-459B-4B99-8818-B6EFB206E785@gmail.com> outcome On Jun 21, 2008, at 3:37 PM, Bryan Ray wrote: > likeliness? likelihood? > unlikeliness? unlikelihood? > > perhaps im not fully understanding though. I never was good at > these type things in high school. > > Sent from my iPhone > > On Jun 21, 2008, at 11:55 AM, David Chelimsky > wrote: > >> Help please. I'm struggling to find the right word. Here are some >> statements - can you fill in the ???: >> >> The sign of +1 is positive. >> The sign of -1 is negative. >> >> The polarity of this magnet is positive. >> The polarity of that magnet is negative. >> >> The ??? of the expression "x should y" is positive. >> The ??? of the expression "x should not y" is negative. >> >> I've already ruled out 'should-ness' :) >> >> Cheers, >> David >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel From a.schur at nucleus.com Sun Jun 22 17:21:53 2008 From: a.schur at nucleus.com (a.schur at nucleus.com) Date: Sun, 22 Jun 2008 15:21:53 -0600 Subject: [rspec-devel] crazy semantic question Message-ID: <26076b36d74f40aaa50b7fa4e4518655.a.schur@nucleus.com> The result of the expression "x should y" is positive. The result of the expression "x should not y" is negative. Or: consequence, outcome Alvin. On Sat, Jun 21, 2008 at 11:55 AM, David Chelimsky wrote: > Help please. I'm struggling to find the right word. Here are some > statements - can you fill in the ???: > > The sign of +1 is positive. > The sign of -1 is negative. > > The polarity of this magnet is positive. > The polarity of that magnet is negative. > > The ??? of the expression "x should y" is positive. > The ??? of the expression "x should not y" is negative. > > I've already ruled out 'should-ness' :) > > Cheers, > David From dchelimsky at gmail.com Sun Jun 22 19:31:53 2008 From: dchelimsky at gmail.com (David Chelimsky) Date: Sun, 22 Jun 2008 18:31:53 -0500 Subject: [rspec-devel] slightly-less-simple-matcher [was: crazy semantic question] In-Reply-To: <26076b36d74f40aaa50b7fa4e4518655.a.schur@nucleus.com> References: <26076b36d74f40aaa50b7fa4e4518655.a.schur@nucleus.com> Message-ID: <1C4F42ED-D763-4598-AE58-3C473183BDEC@gmail.com> The ??? of the expression "x should y" is positive. The ??? of the expression "x should not y" is negative. So we've got: sense outcome consequence mood feeling aura timbre (un)likeliness (un)likelihood Let me provide a bit more context. RSpec matchers don't know whether they're being called with should or should_not. I'm toying with adding that capability such that if the matcher will accept a 2nd argument to the matches? method it will be given a hash. Then you can do this: def matches?(given, options, &block) if options[:should_ness] == :positive # handle the 'should' case else # handle the 'should_not' case end end Although, now that I'm looking at it, it could just be: def matches?(given, options, &block) if options[:called_with] == :should # handle the 'should' case else # handle the 'should_not' case end end Maybe that solves the problem? Thoughts? For those interested, this stems from some evolution of the simple_matcher method. Right now (in git) you can do this: def report_to(manager) simple_matcher do |employee, matcher| matcher.failure_message = "expected #{employee} to report to #{manager}" employee.reports_to?(manager) end end Some have expressed a desire to make these more like expectation wrappers, where you can put a couple of logical expectations together. The example above uses a boolean expression. But what if you wanted to do this? def report_to(manager) simple_matcher do |employee, matcher| matcher.failure_message = "expected #{employee} to report to #{manager} and #{manager} not to report to #{employee}" employee.reports_to?(manager).should be_true manager.reports_to?(employee).should be_false end end This actually works ... as long as you only call it with should. If you use should_not, you'll get the wrong response, whereas the original boolean expression would work fine. To be able to support this, the matcher *could* be written like this: def report_to(manager) simple_matcher do |employee, matcher| if matcher.called_with_should? matcher.failure_message = "expected #{employee} to report to #{manager}" employee.reports_to?(manager).should be_true manager.reports_to?(employee).should be_false else matcher.failure_message = "expected #{employee} to report to #{manager} and #{manager} not to report to #{employee}" employee.reports_to?(manager).should be_false end end end Now you have a custom matcher that can handle should and should_not cases with the appropriate expectations and semantics for each. A bit more complex than maybe a simple matcher should be :) And certainly not necessary for you to use this way - just available. Any feedback on this is welcome. Cheers, David From weexpectedthis at gmail.com Wed Jun 25 23:44:34 2008 From: weexpectedthis at gmail.com (Kyle Peyton) Date: Wed, 25 Jun 2008 20:44:34 -0700 Subject: [rspec-devel] crazy semantic question In-Reply-To: <26076b36d74f40aaa50b7fa4e4518655.a.schur@nucleus.com> References: <26076b36d74f40aaa50b7fa4e4518655.a.schur@nucleus.com> Message-ID: <8af5d4150806252044u381b5b7dn232f73f340e97f4@mail.gmail.com> I vote "result" as well. Seems best to me. -Kyle On Sun, Jun 22, 2008 at 2:21 PM, a.schur at nucleus.com wrote: > > The result of the expression "x should y" is positive. > The result of the expression "x should not y" is > negative. > > Or: consequence, outcome > > Alvin. > > On Sat, Jun 21, 2008 at 11:55 AM, David Chelimsky > > wrote: > > > Help please. I'm struggling to find the right word. > Here are some > > statements - can you fill in the ???: > > > > The sign of +1 is positive. > > The sign of -1 is negative. > > > > The polarity of this magnet is positive. > > The polarity of that magnet is negative. > > > > The ??? of the expression "x should y" is positive. > > The ??? of the expression "x should not y" is negative. > > > > I've already ruled out 'should-ness' :) > > > > Cheers, > > David > > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tastapod at gmail.com Thu Jun 26 13:37:37 2008 From: tastapod at gmail.com (Dan North) Date: Thu, 26 Jun 2008 18:37:37 +0100 Subject: [rspec-devel] crazy semantic question In-Reply-To: <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> Message-ID: I really like "sense" too. I was also playing with "intent", but "positive intent" and "negative intent" have specific meaning elsewhere in cognitive psychology. (A statement with negative intent would probably want to do you harm!) So my vote is for "sense". Cheers, Dan 2008/6/21 Dean Wampler : > How about: > The sense of the expression "x should y" is positive. > The sense of the expression "x should not y" is negative. > > dean > > On Sat, Jun 21, 2008 at 11:55 AM, David Chelimsky > wrote: > >> Help please. I'm struggling to find the right word. Here are some >> statements - can you fill in the ???: >> >> The sign of +1 is positive. >> The sign of -1 is negative. >> >> The polarity of this magnet is positive. >> The polarity of that magnet is negative. >> >> The ??? of the expression "x should y" is positive. >> The ??? of the expression "x should not y" is negative. >> >> I've already ruled out 'should-ness' :) >> >> Cheers, >> David >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > > > > -- > Dean Wampler > http://www.objectmentor.com > http://www.aspectprogramming.com > http://aquarium.rubyforge.org > http://www.contract4j.org > > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pergesu at gmail.com Thu Jun 26 22:26:37 2008 From: pergesu at gmail.com (Pat Maddox) Date: Thu, 26 Jun 2008 19:26:37 -0700 Subject: [rspec-devel] crazy semantic question In-Reply-To: References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> Message-ID: <810a540e0806261926u218bbac5g1d4383a1d7ce3714@mail.gmail.com> > So my vote is for "sense". What about "essence" ? From bryansray at gmail.com Thu Jun 26 22:33:21 2008 From: bryansray at gmail.com (Bryan Ray) Date: Thu, 26 Jun 2008 21:33:21 -0500 Subject: [rspec-devel] crazy semantic question In-Reply-To: <810a540e0806261926u218bbac5g1d4383a1d7ce3714@mail.gmail.com> References: <4F78A2D9-959E-4E1F-A38D-2F1EB597B6E1@gmail.com> <6cf2a94f0806211002h6177c978g95461876d15f26ac@mail.gmail.com> <810a540e0806261926u218bbac5g1d4383a1d7ce3714@mail.gmail.com> Message-ID: <1B22754D-D8B9-438D-8259-DE554D47D732@gmail.com> What about "since" ... or even "cents" ... sorry, spam message, but I found it humorous. :) On Jun 26, 2008, at 9:26 PM, Pat Maddox wrote: >> So my vote is for "sense". > > What about "essence" ? > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel