From aslak.hellesoy at gmail.com Tue May 1 07:43:14 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 1 May 2007 13:43:14 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.1 released Message-ID: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> The RSpec team is pleased to announce RSpec 0.9.1 (we skipped 0.9.0). RSpec is a framework that provides programmers with a Domain Specific Language to describe the behaviour of Ruby code with readable, executable examples that guide you in the design process and serve well as both documentation as tests. This release includes a complete overhaul of the API, which can be summarised as follows: * "context" is now "describe" (we call the blocks behaviours) * "specify" is now "it" (we call the blocks examples) * "should_something" is now "should something" (magic underscores are gone) In order to ease the transition from older specs, RSpec also includes a translator that will translate your old specs. In addition to these major changes, this release has over 60 applied RFEs and bug fixes, many of them related to Spec::Rails - the Ruby on Rails plugin for RSpec. To install RSpec: gem install rspec (you may have to wait a few hours for the gems to replicate) To translate old specs: spec_translator from_dir to_dir (can be the same dir if you use source control and know how to revert) To see the full list of changes: http://rspec.rubyforge.org/rdoc/files/CHANGES.html The RSpec home page: http://rspec.rubyforge.org/ How to use RSpec with Rails: http://rspec.rubyforge.org/documentation/rails/index.html [Regards, The RSpec team] From chris.c.hoffman at gmail.com Tue May 1 08:09:10 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Tue, 1 May 2007 08:09:10 -0400 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> Message-ID: <63c5d3820705010509k4bb7a3deg95848a30afc05a62@mail.gmail.com> Hello, I am currently on the HEAD of the svn repository, and I am trying to run the spec_translator. I chmod'd, shabanged, and tried to execute the following: ./vendor/plugins/rspec/bin/spec_translator spec spec And got the following response: : No such file or directory I should note that I'm doing this within a rails directory tree. Is there something I'm missing? Thanks. -Chris On 5/1/07, aslak hellesoy wrote: > The RSpec team is pleased to announce RSpec 0.9.1 (we skipped 0.9.0). > > RSpec is a framework that provides programmers with a Domain Specific > Language to describe the behaviour of Ruby code with readable, > executable examples that guide you in the > design process and serve well as both documentation as tests. > > This release includes a complete overhaul of the API, which can be > summarised as follows: > * "context" is now "describe" (we call the blocks behaviours) > * "specify" is now "it" (we call the blocks examples) > * "should_something" is now "should something" (magic underscores are gone) > > In order to ease the transition from older specs, RSpec also includes > a translator that will translate your old specs. > > In addition to these major changes, this release has over 60 applied > RFEs and bug fixes, many of them related to Spec::Rails - the Ruby on > Rails plugin for RSpec. > > To install RSpec: > > gem install rspec (you may have to wait a few hours for the gems to replicate) > > To translate old specs: > > spec_translator from_dir to_dir (can be the same dir if you use > source control and know how to revert) > > To see the full list of changes: > > http://rspec.rubyforge.org/rdoc/files/CHANGES.html > > The RSpec home page: > > http://rspec.rubyforge.org/ > > How to use RSpec with Rails: > > http://rspec.rubyforge.org/documentation/rails/index.html > > [Regards, The RSpec team] > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Tue May 1 08:30:47 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 1 May 2007 07:30:47 -0500 Subject: [rspec-users] rspec and autotest Message-ID: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you'll want to read this blog: http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and-autotest-zentest-3-5-2 Enjoy! David From chris.c.hoffman at gmail.com Tue May 1 09:47:02 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Tue, 1 May 2007 09:47:02 -0400 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <63c5d3820705010509k4bb7a3deg95848a30afc05a62@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> <63c5d3820705010509k4bb7a3deg95848a30afc05a62@mail.gmail.com> Message-ID: <63c5d3820705010647p294587e9u256d273c25684d9f@mail.gmail.com> I have attached a patch file, which adds a rake task for this translation. As this is my first rake task, it is very likely in need of rework, but hopefully someone finds it useful. On 5/1/07, Chris Hoffman wrote: > Hello, > I am currently on the HEAD of the svn repository, and I am trying to > run the spec_translator. I chmod'd, shabanged, and tried to execute > the following: > > ./vendor/plugins/rspec/bin/spec_translator spec spec > > And got the following response: > : No such file or directory > > I should note that I'm doing this within a rails directory tree. Is > there something I'm missing? Thanks. > > -Chris > > On 5/1/07, aslak hellesoy wrote: > > The RSpec team is pleased to announce RSpec 0.9.1 (we skipped 0.9.0). > > > > RSpec is a framework that provides programmers with a Domain Specific > > Language to describe the behaviour of Ruby code with readable, > > executable examples that guide you in the > > design process and serve well as both documentation as tests. > > > > This release includes a complete overhaul of the API, which can be > > summarised as follows: > > * "context" is now "describe" (we call the blocks behaviours) > > * "specify" is now "it" (we call the blocks examples) > > * "should_something" is now "should something" (magic underscores are gone) > > > > In order to ease the transition from older specs, RSpec also includes > > a translator that will translate your old specs. > > > > In addition to these major changes, this release has over 60 applied > > RFEs and bug fixes, many of them related to Spec::Rails - the Ruby on > > Rails plugin for RSpec. > > > > To install RSpec: > > > > gem install rspec (you may have to wait a few hours for the gems to replicate) > > > > To translate old specs: > > > > spec_translator from_dir to_dir (can be the same dir if you use > > source control and know how to revert) > > > > To see the full list of changes: > > > > http://rspec.rubyforge.org/rdoc/files/CHANGES.html > > > > The RSpec home page: > > > > http://rspec.rubyforge.org/ > > > > How to use RSpec with Rails: > > > > http://rspec.rubyforge.org/documentation/rails/index.html > > > > [Regards, The RSpec team] > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: translator_rake_task.patch Type: text/x-patch Size: 663 bytes Desc: not available Url : http://rubyforge.org/pipermail/rspec-users/attachments/20070501/1e64bef5/attachment.bin From chris.c.hoffman at gmail.com Tue May 1 10:08:15 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Tue, 1 May 2007 10:08:15 -0400 Subject: [rspec-users] Migrating spec_helper with modifications In-Reply-To: <57c63afe0704301415g51251fa9q998bbc55b8f8f094@mail.gmail.com> References: <63c5d3820704301228t343df624i3a8aaaafcfe4e341@mail.gmail.com> <57c63afe0704301231q3d0f4605gd7d0e53abad4b69a@mail.gmail.com> <63c5d3820704301241v2264cda7o4819d9b54ebae12f@mail.gmail.com> <57c63afe0704301245p27ebaf29l1cefb7d610aae59b@mail.gmail.com> <63c5d3820704301249g56f10e2bj7dc11ab59fd43927@mail.gmail.com> <57c63afe0704301253o72fce72ayf1c5b621815471c7@mail.gmail.com> <57c63afe0704301415g51251fa9q998bbc55b8f8f094@mail.gmail.com> Message-ID: <63c5d3820705010708u24ce1c91sa39c7d42c3b58a92@mail.gmail.com> Nice work! -Chris On 4/30/07, David Chelimsky wrote: > DONE - I added support for config.include to rev 1851. So you should > be able to do this: > > Spec::Runner.configure do |config| > config.include MyModule > end > > and it's the same as doing this: > > describe Something do > include MyModule > end > > in every description. > > Cheers, > David > > On 4/30/07, David Chelimsky wrote: > > On 4/30/07, Chris Hoffman wrote: > > > Okay, I got it working with the following: > > > > > > Spec::Runner.configure do |config| > > > config.use_transactional_fixtures = true > > > config.use_instantiated_fixtures = false > > > config.fixture_path = RAILS_ROOT + '/spec/fixtures' > > > Spec::DSL::Behaviour.send(:include, Breakpoint) > > > Spec::DSL::Behaviour.send(:include, HpricotSpecHelper) > > > end > > > > > > I couldn't call include directly, as it's a private method. > > > > > > Should I be using this mailing list for these HEAD issues, or is there > > > a better place? > > > > As long as you have a workaround, go ahead and use that for now. I'll > > get the support for config.include in place in the next day or so - > > possibly even today. > > > > rspec-devel is probably better, but this list is fine. Lots of > > trunksters on this list. > > > > Cheers, > > David > > > > > > > > -Chris > > > > > > On 4/30/07, David Chelimsky wrote: > > > > On 4/30/07, Chris Hoffman wrote: > > > > > That doesn't seem to work for me: > > > > > > > > > > Spec::Runner.configure do |config| > > > > > config.use_transactional_fixtures = true > > > > > config.use_instantiated_fixtures = false > > > > > config.fixture_path = RAILS_ROOT + '/spec/fixtures' > > > > > config.include Breakpoint > > > > > end > > > > > > > > > > Gives me an undefined method 'include' > > > > > > > > > > ./spec/models/../spec_helper.rb:13: undefined method `include' for > > > > > # (NoMethodError) > > > > > > > > UGH - that was the intent - I have to add that. > > > > > > > > In the mean time, you can use Spec::DSL::Behaviour.include - but that > > > > is subject to change. That's just what it is today. I'll follow up > > > > when I add config.include. > > > > > > > > Cheers, > > > > David > > > > > > > > > > > > > > > > > > -Chris > > > > > > > > > > On 4/30/07, David Chelimsky wrote: > > > > > > On 4/30/07, Chris Hoffman wrote: > > > > > > > Hello, > > > > > > > > > > > > > > After moving into the HEAD of rspec, I am greeted with a mountain of errors, > > > > > > > which I expected, due to my specs not being migrated. > > > > > > > > > > > > > > I use hpricot for a lot of my view tests, as it is extremely simple to > > > > > > > traverse the DOM with it. I used to include HpricotSpecHelper in > > > > > > > spec_helper.rb, like so: > > > > > > > > > > > > > > require 'hpricot_spec_helper' > > > > > > > > > > > > > > module Spec > > > > > > > module Rails > > > > > > > module Runner > > > > > > > class EvalContext < Test::Unit::TestCase > > > > > > > include HpricotSpecHelper > > > > > > > end > > > > > > > end > > > > > > > end > > > > > > > end > > > > > > > > > > > > > > However, I am now getting errors that indicate that this inclusion no longer > > > > > > > does what I want. Is there a different class in which I should be including > > > > > > > this module? > > > > > > > > > > > > > > The errors I'm getting are of the following type: > > > > > > > > > > > > > > undefined method `elements' for > > > > > > > #<#:0xb6eb8ff0> > > > > > > > > > > > > > > element(s) is a top-level method, so I would do things like the following: > > > > > > > > > > > > > > element("p").inner_text.should == "Hello World" > > > > > > > > > > > > > > The following link shows HpricotSpecHelper (with syntax highlighting): > > > > > > > > > > > > > > http://src.chrishoffman.net/lib/hpricot_spec_helper.rb > > > > > > > > > > > > > > Please let me know if I am not being clear with my difficulty. Thanks for > > > > > > > the help. > > > > > > > > > > > > The easy way to include modules now is like this: > > > > > > > > > > > > Spec::Runner.configure do |config| > > > > > > config.include SomeModule > > > > > > end > > > > > > > > > > > > That gets included in every behaviour. > > > > > > > > > > > > That help? > > > > > > > > > > > > > > > > > > > > -Chris > > > > > > > > > > > > > > _______________________________________________ > > > > > > > rspec-users mailing list > > > > > > > rspec-users at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > > > > > > > _______________________________________________ > > > > > > rspec-users mailing list > > > > > > rspec-users at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > > > > > _______________________________________________ > > > > > rspec-users mailing list > > > > > rspec-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > > > _______________________________________________ > > > > rspec-users mailing list > > > > rspec-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From chris.c.hoffman at gmail.com Tue May 1 13:03:25 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Tue, 1 May 2007 13:03:25 -0400 Subject: [rspec-users] release 0.9 'modifies' specs at each rake invocation? Message-ID: <63c5d3820705011003r507e5f2bq31bf7b17b063db65@mail.gmail.com> Hello, I am getting some odd behaviour. If I execute rake spec, and then try to modify a spec file that I have open in vi, and then go to save this file, vi warns me that the file has been modified outside of vi. However, if I execute only this file via script/spec, this modification does not take place. I file doesn't appear to be getting substantively modified, so I'm guessing it is just that it is being opened with a write flag inadvertently. I am on HEAD for both rspec and rspec_on_rails, btw. -Chris From armin.joellenbeck at googlemail.com Tue May 1 13:11:27 2007 From: armin.joellenbeck at googlemail.com (Armin Joellenbeck) Date: Tue, 1 May 2007 19:11:27 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> Message-ID: <4a117bfc0705011011g1d2fcb78r89951d7aa98aa837@mail.gmail.com> Hello, I am missing in the subversion history: tags/REL_0_9_1/rspec tags/REL_0_9_1/rspec_on_rails Regards, Armin From aslak.hellesoy at gmail.com Tue May 1 13:32:35 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 1 May 2007 19:32:35 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <4a117bfc0705011011g1d2fcb78r89951d7aa98aa837@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> <4a117bfc0705011011g1d2fcb78r89951d7aa98aa837@mail.gmail.com> Message-ID: <8d961d900705011032y321ee840ka5fa681b94d84589@mail.gmail.com> On 5/1/07, Armin Joellenbeck wrote: > Hello, > > I am missing in the subversion history: > What do you mean? Aslak > tags/REL_0_9_1/rspec > tags/REL_0_9_1/rspec_on_rails > > Regards, Armin > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From armin.joellenbeck at googlemail.com Tue May 1 14:08:47 2007 From: armin.joellenbeck at googlemail.com (Armin Joellenbeck) Date: Tue, 1 May 2007 20:08:47 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <8d961d900705011032y321ee840ka5fa681b94d84589@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> <4a117bfc0705011011g1d2fcb78r89951d7aa98aa837@mail.gmail.com> <8d961d900705011032y321ee840ka5fa681b94d84589@mail.gmail.com> Message-ID: <4a117bfc0705011108k661f9e56j928ebeec0783ae78@mail.gmail.com> > > I am missing in the subversion history: > > > > What do you mean? > > Aslak > > > tags/REL_0_9_1/rspec > > tags/REL_0_9_1/rspec_on_rails > > > > Regards, Armin I want to install rspec and rspec_on_rails with version 0.9.1 as rails plugins. When I took a look in the subversion repository at rubyforge, see http://viewvc.rubyforge.mmmultiworks.com/cgi/viewvc.cgi/tags/?root=rspec I missed the tag REL_0_9_1. The last one is REL_0_9_0_BETA_2. I hope, I have now better explained what I am missing. Regards, Armin From aslak.hellesoy at gmail.com Tue May 1 14:24:50 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Tue, 1 May 2007 20:24:50 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <4a117bfc0705011108k661f9e56j928ebeec0783ae78@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> <4a117bfc0705011011g1d2fcb78r89951d7aa98aa837@mail.gmail.com> <8d961d900705011032y321ee840ka5fa681b94d84589@mail.gmail.com> <4a117bfc0705011108k661f9e56j928ebeec0783ae78@mail.gmail.com> Message-ID: <8d961d900705011124v20da8028y35fe7d2c8e92321e@mail.gmail.com> On 5/1/07, Armin Joellenbeck wrote: > > > I am missing in the subversion history: > > > > > > > What do you mean? > > > > Aslak > > > > > tags/REL_0_9_1/rspec > > > tags/REL_0_9_1/rspec_on_rails > > > > > > Regards, Armin > > I want to install rspec and rspec_on_rails with version 0.9.1 as rails > plugins. When I took a look in the subversion repository at rubyforge, > see > > http://viewvc.rubyforge.mmmultiworks.com/cgi/viewvc.cgi/tags/?root=rspec > It looks like the ViewVC on RubyForge is running against a copy of the subversion repo that is about 24 hours old - probably for performance reasons - I don't know. Anyway, the tag is really there. Proof: svn ls svn://rubyforge.org/var/svn/rspec/tags REL_0_5_10/ REL_0_5_11/ REL_0_5_12/ REL_0_5_13/ REL_0_5_14/ REL_0_5_15/ REL_0_5_16/ REL_0_5_6/ REL_0_5_7/ REL_0_5_8/ REL_0_5_9/ REL_0_6_0/ REL_0_6_1/ REL_0_6_2/ REL_0_6_3/ REL_0_6_4/ REL_0_7_0/ REL_0_7_1/ REL_0_7_2/ REL_0_7_3/ REL_0_7_4/ REL_0_7_5/ REL_0_7_5_1/ REL_0_8_0/ REL_0_8_0_RC1/ REL_0_8_1/ REL_0_8_2/ REL_0_9_0_BETA_1/ REL_0_9_0_BETA_2/ REL_0_9_1/ Are you having problems checking out the tag? Aslak > I missed the tag REL_0_9_1. The last one is REL_0_9_0_BETA_2. > > I hope, I have now better explained what I am missing. > > Regards, Armin > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From armin.joellenbeck at googlemail.com Tue May 1 14:34:51 2007 From: armin.joellenbeck at googlemail.com (Armin Joellenbeck) Date: Tue, 1 May 2007 20:34:51 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.1 released In-Reply-To: <8d961d900705011124v20da8028y35fe7d2c8e92321e@mail.gmail.com> References: <8d961d900705010443h65eb9389n44905a45cae601b9@mail.gmail.com> <4a117bfc0705011011g1d2fcb78r89951d7aa98aa837@mail.gmail.com> <8d961d900705011032y321ee840ka5fa681b94d84589@mail.gmail.com> <4a117bfc0705011108k661f9e56j928ebeec0783ae78@mail.gmail.com> <8d961d900705011124v20da8028y35fe7d2c8e92321e@mail.gmail.com> Message-ID: <4a117bfc0705011134i6c27820ftf801d4dc2bd679c@mail.gmail.com> > It looks like the ViewVC on RubyForge is running against a copy of the > subversion repo that is about 24 hours old - probably for performance > reasons - I don't know. Sorry, my fault to trust an out of date repository viewer. I have checked out version 0.9.1 without problems. Regards, Armin From cwdinfo at gmail.com Tue May 1 14:49:04 2007 From: cwdinfo at gmail.com (s.ross) Date: Tue, 1 May 2007 11:49:04 -0700 Subject: [rspec-users] rspec and autotest In-Reply-To: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> References: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> Message-ID: I just installed the rspec plugin from trunk and zentest 3.5.2. I applied the patch and get: lacosta:~/bitscribe/maxius_unified sxross$ autotest loading rspec_rails_autotest /Users/sxross/.autotest:5: undefined method `spec_command=' for # (NoMethodError) Any idea what's up with this? Thanks On May 1, 2007, at 5:30 AM, David Chelimsky wrote: > If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you'll > want to read this blog: > > http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and- > autotest-zentest-3-5-2 > > Enjoy! > > David > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From dchelimsky at gmail.com Tue May 1 14:56:22 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 1 May 2007 13:56:22 -0500 Subject: [rspec-users] rspec and autotest In-Reply-To: References: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> Message-ID: <57c63afe0705011156u1a0c92e5n81296bc7dc06917a@mail.gmail.com> On 5/1/07, s.ross wrote: > I just installed the rspec plugin from trunk and zentest 3.5.2. I > applied the patch and get: > > lacosta:~/bitscribe/maxius_unified sxross$ autotest > loading rspec_rails_autotest > /Users/sxross/.autotest:5: undefined method `spec_command=' for > # (NoMethodError) > > > Any idea what's up with this? If you followed all the instructions on the blog, no idea at all. Anybody else? > > Thanks > > On May 1, 2007, at 5:30 AM, David Chelimsky wrote: > > > If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you'll > > want to read this blog: > > > > http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and- > > autotest-zentest-3-5-2 > > > > Enjoy! > > > > David > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From cwdinfo at gmail.com Tue May 1 15:07:40 2007 From: cwdinfo at gmail.com (s.ross) Date: Tue, 1 May 2007 12:07:40 -0700 Subject: [rspec-users] rspec and autotest In-Reply-To: <57c63afe0705011156u1a0c92e5n81296bc7dc06917a@mail.gmail.com> References: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> <57c63afe0705011156u1a0c92e5n81296bc7dc06917a@mail.gmail.com> Message-ID: <5AE8D82E-2289-4E34-9666-1F34A2D619F6@gmail.com> Just followed all the instructions again...no luck. Steve On May 1, 2007, at 11:56 AM, David Chelimsky wrote: > On 5/1/07, s.ross wrote: >> I just installed the rspec plugin from trunk and zentest 3.5.2. I >> applied the patch and get: >> >> lacosta:~/bitscribe/maxius_unified sxross$ autotest >> loading rspec_rails_autotest >> /Users/sxross/.autotest:5: undefined method `spec_command=' for >> # (NoMethodError) >> >> >> Any idea what's up with this? > > If you followed all the instructions on the blog, no idea at all. > Anybody else? > >> >> Thanks >> >> On May 1, 2007, at 5:30 AM, David Chelimsky wrote: >> >>> If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you'll >>> want to read this blog: >>> >>> http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and- >>> autotest-zentest-3-5-2 >>> >>> Enjoy! >>> >>> David >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From dchelimsky at gmail.com Tue May 1 15:57:17 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 1 May 2007 14:57:17 -0500 Subject: [rspec-users] rspec and autotest In-Reply-To: <5AE8D82E-2289-4E34-9666-1F34A2D619F6@gmail.com> References: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> <57c63afe0705011156u1a0c92e5n81296bc7dc06917a@mail.gmail.com> <5AE8D82E-2289-4E34-9666-1F34A2D619F6@gmail.com> Message-ID: <57c63afe0705011257xea99fc6te7ad84e47ad13898@mail.gmail.com> On 5/1/07, s.ross wrote: > Just followed all the instructions again...no luck. I just noticed this in your error message: /Users/sxross/.autotest If you're using my patch, you shouldn't need a .autotest file. I wonder if there is a conflict. Try moving that file somewhere or renaming it and see what happens. David > > Steve > > On May 1, 2007, at 11:56 AM, David Chelimsky wrote: > > > On 5/1/07, s.ross wrote: > >> I just installed the rspec plugin from trunk and zentest 3.5.2. I > >> applied the patch and get: > >> > >> lacosta:~/bitscribe/maxius_unified sxross$ autotest > >> loading rspec_rails_autotest > >> /Users/sxross/.autotest:5: undefined method `spec_command=' for > >> # (NoMethodError) > >> > >> > >> Any idea what's up with this? > > > > If you followed all the instructions on the blog, no idea at all. > > Anybody else? > > > >> > >> Thanks > >> > >> On May 1, 2007, at 5:30 AM, David Chelimsky wrote: > >> > >>> If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you'll > >>> want to read this blog: > >>> > >>> http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and- > >>> autotest-zentest-3-5-2 > >>> > >>> Enjoy! > >>> > >>> David > >>> _______________________________________________ > >>> rspec-users mailing list > >>> rspec-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/rspec-users > >> > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > >> > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From cwdinfo at gmail.com Tue May 1 16:02:09 2007 From: cwdinfo at gmail.com (s.ross) Date: Tue, 1 May 2007 13:02:09 -0700 Subject: [rspec-users] rspec and autotest In-Reply-To: <57c63afe0705011257xea99fc6te7ad84e47ad13898@mail.gmail.com> References: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> <57c63afe0705011156u1a0c92e5n81296bc7dc06917a@mail.gmail.com> <5AE8D82E-2289-4E34-9666-1F34A2D619F6@gmail.com> <57c63afe0705011257xea99fc6te7ad84e47ad13898@mail.gmail.com> Message-ID: <282D4EAD-CC2E-4478-A176-2BD496379D29@gmail.com> Incredible! This was another of those "until zentest and rspec sync up" hacks to keep everything happy. I just totally missed it. Thanks so much. Steve On May 1, 2007, at 12:57 PM, David Chelimsky wrote: > On 5/1/07, s.ross wrote: >> Just followed all the instructions again...no luck. > > I just noticed this in your error message: > > /Users/sxross/.autotest > > If you're using my patch, you shouldn't need a .autotest file. I > wonder if there is a conflict. Try moving that file somewhere or > renaming it and see what happens. > > David > > >> >> Steve >> >> On May 1, 2007, at 11:56 AM, David Chelimsky wrote: >> >>> On 5/1/07, s.ross wrote: >>>> I just installed the rspec plugin from trunk and zentest 3.5.2. I >>>> applied the patch and get: >>>> >>>> lacosta:~/bitscribe/maxius_unified sxross$ autotest >>>> loading rspec_rails_autotest >>>> /Users/sxross/.autotest:5: undefined method `spec_command=' for >>>> # (NoMethodError) >>>> >>>> >>>> Any idea what's up with this? >>> >>> If you followed all the instructions on the blog, no idea at all. >>> Anybody else? >>> >>>> >>>> Thanks >>>> >>>> On May 1, 2007, at 5:30 AM, David Chelimsky wrote: >>>> >>>>> If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), >>>>> you'll >>>>> want to read this blog: >>>>> >>>>> http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1- >>>>> and- >>>>> autotest-zentest-3-5-2 >>>>> >>>>> Enjoy! >>>>> >>>>> David >>>>> _______________________________________________ >>>>> rspec-users mailing list >>>>> rspec-users at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From dchelimsky at gmail.com Tue May 1 16:26:29 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Tue, 1 May 2007 15:26:29 -0500 Subject: [rspec-users] rspec and autotest In-Reply-To: <282D4EAD-CC2E-4478-A176-2BD496379D29@gmail.com> References: <57c63afe0705010530g751d046ct4552202e7a9a9bf@mail.gmail.com> <57c63afe0705011156u1a0c92e5n81296bc7dc06917a@mail.gmail.com> <5AE8D82E-2289-4E34-9666-1F34A2D619F6@gmail.com> <57c63afe0705011257xea99fc6te7ad84e47ad13898@mail.gmail.com> <282D4EAD-CC2E-4478-A176-2BD496379D29@gmail.com> Message-ID: <57c63afe0705011326n60eceb0ene0c1663e1721a12f@mail.gmail.com> On 5/1/07, s.ross wrote: > Incredible! This was another of those "until zentest and rspec sync > up" hacks to keep everything happy. I'm working on it but it takes two to tango. > I just totally missed it. Glad I caught it. Cheers, David > > Thanks so much. > > Steve > > On May 1, 2007, at 12:57 PM, David Chelimsky wrote: > > > On 5/1/07, s.ross wrote: > >> Just followed all the instructions again...no luck. > > > > I just noticed this in your error message: > > > > /Users/sxross/.autotest > > > > If you're using my patch, you shouldn't need a .autotest file. I > > wonder if there is a conflict. Try moving that file somewhere or > > renaming it and see what happens. > > > > David > > > > > >> > >> Steve > >> > >> On May 1, 2007, at 11:56 AM, David Chelimsky wrote: > >> > >>> On 5/1/07, s.ross wrote: > >>>> I just installed the rspec plugin from trunk and zentest 3.5.2. I > >>>> applied the patch and get: > >>>> > >>>> lacosta:~/bitscribe/maxius_unified sxross$ autotest > >>>> loading rspec_rails_autotest > >>>> /Users/sxross/.autotest:5: undefined method `spec_command=' for > >>>> # (NoMethodError) > >>>> > >>>> > >>>> Any idea what's up with this? > >>> > >>> If you followed all the instructions on the blog, no idea at all. > >>> Anybody else? > >>> > >>>> > >>>> Thanks > >>>> > >>>> On May 1, 2007, at 5:30 AM, David Chelimsky wrote: > >>>> > >>>>> If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), > >>>>> you'll > >>>>> want to read this blog: > >>>>> > >>>>> http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1- > >>>>> and- > >>>>> autotest-zentest-3-5-2 > >>>>> > >>>>> Enjoy! > >>>>> > >>>>> David > >>>>> _______________________________________________ > >>>>> rspec-users mailing list > >>>>> rspec-users at rubyforge.org > >>>>> http://rubyforge.org/mailman/listinfo/rspec-users > >>>> > >>>> _______________________________________________ > >>>> rspec-users mailing list > >>>> rspec-users at rubyforge.org > >>>> http://rubyforge.org/mailman/listinfo/rspec-users > >>>> > >>> _______________________________________________ > >>> rspec-users mailing list > >>> rspec-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/rspec-users > >> > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > >> > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From lists at kikobu.com Wed May 2 11:03:43 2007 From: lists at kikobu.com (Morten) Date: Wed, 02 May 2007 17:03:43 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? Message-ID: <4638A84F.4030507@kikobu.com> Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec When I try to run my specs though, I get the below error. It's as if the spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is part of the rspec plugin, but I'm using the gem and cannot find spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging my head against the walls. Things fall out. Any tips much appreciated. Morten white:~/svn/novalis morten$ rake spec (in /Users/morten/svn/novalis) /opt/local/bin/ruby -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" "spec/controllers/account_controller_spec.rb" "spec/controllers/admin_controller_spec.rb" "spec/controllers/auhtenticate_controller_spec.rb" "spec/controllers/bar_controller_spec.rb" "spec/controllers/calendar_test_controller_spec.rb" "spec/controllers/manager_controller_spec.rb" "spec/controllers/reports_controller_spec.rb" "spec/controllers/stress_profiles_controller_spec.rb" "spec/controllers/therapist_controller_spec.rb" --options "/Users/morten/svn/novalis/config/../spec/spec.opts" /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- spec/rails (MissingSourceFile) from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in `require' from /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in' from /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in `require' from ./spec/controllers/../spec_helper.rb:5 from ./spec/controllers/account_controller_spec.rb:1 From aslak.hellesoy at gmail.com Wed May 2 11:39:49 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Wed, 2 May 2007 17:39:49 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <4638A84F.4030507@kikobu.com> References: <4638A84F.4030507@kikobu.com> Message-ID: <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> On 5/2/07, Morten wrote: > > Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. > I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: > > ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec > > When I try to run my specs though, I get the below error. It's as if the > spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is > part of the rspec plugin, but I'm using the gem and cannot find > spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging > my head against the walls. Things fall out. > > Any tips much appreciated. > Did you rerun script/generate rspec after upgrading? Could you try to upgrade to RSpec 0.9.1? Aslak > Morten > > white:~/svn/novalis morten$ rake spec > (in /Users/morten/svn/novalis) > /opt/local/bin/ruby > -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" > "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" > "spec/controllers/account_controller_spec.rb" > "spec/controllers/admin_controller_spec.rb" > "spec/controllers/auhtenticate_controller_spec.rb" > "spec/controllers/bar_controller_spec.rb" > "spec/controllers/calendar_test_controller_spec.rb" > "spec/controllers/manager_controller_spec.rb" > "spec/controllers/reports_controller_spec.rb" > "spec/controllers/stress_profiles_controller_spec.rb" > "spec/controllers/therapist_controller_spec.rb" --options > "/Users/morten/svn/novalis/config/../spec/spec.opts" > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- spec/rails > (MissingSourceFile) > from > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > `require' > from > /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in > `new_constants_in' > from > /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > `require' > from ./spec/controllers/../spec_helper.rb:5 > from ./spec/controllers/account_controller_spec.rb:1 > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Wed May 2 11:40:05 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 2 May 2007 10:40:05 -0500 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <4638A84F.4030507@kikobu.com> References: <4638A84F.4030507@kikobu.com> Message-ID: <57c63afe0705020840s4b91fefetcc9712ffb7baaba@mail.gmail.com> Since you're upgrading, why don't you upgrade to 0.9.1? That's the latest and greatest. David On 5/2/07, Morten wrote: > > Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. > I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: > > ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec > > When I try to run my specs though, I get the below error. It's as if the > spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is > part of the rspec plugin, but I'm using the gem and cannot find > spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging > my head against the walls. Things fall out. > > Any tips much appreciated. > > Morten > > white:~/svn/novalis morten$ rake spec > (in /Users/morten/svn/novalis) > /opt/local/bin/ruby > -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" > "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" > "spec/controllers/account_controller_spec.rb" > "spec/controllers/admin_controller_spec.rb" > "spec/controllers/auhtenticate_controller_spec.rb" > "spec/controllers/bar_controller_spec.rb" > "spec/controllers/calendar_test_controller_spec.rb" > "spec/controllers/manager_controller_spec.rb" > "spec/controllers/reports_controller_spec.rb" > "spec/controllers/stress_profiles_controller_spec.rb" > "spec/controllers/therapist_controller_spec.rb" --options > "/Users/morten/svn/novalis/config/../spec/spec.opts" > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- spec/rails > (MissingSourceFile) > from > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from > /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > `require' > from > /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in > `new_constants_in' > from > /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > `require' > from ./spec/controllers/../spec_helper.rb:5 > from ./spec/controllers/account_controller_spec.rb:1 > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From lists at kikobu.com Wed May 2 11:40:52 2007 From: lists at kikobu.com (Morten) Date: Wed, 02 May 2007 17:40:52 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> Message-ID: <4638B104.90708@kikobu.com> aslak hellesoy wrote: > On 5/2/07, Morten wrote: >> Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. >> I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: >> >> ruby script/plugin install >> svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec >> >> When I try to run my specs though, I get the below error. It's as if the >> spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is >> part of the rspec plugin, but I'm using the gem and cannot find >> spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging >> my head against the walls. Things fall out. >> >> Any tips much appreciated. >> > > Did you rerun script/generate rspec after upgrading? Yes. > Could you try to upgrade to RSpec 0.9.1? Hmm.. I tried that path but it changed a lot of specs to non-working. Br, Morten > > Aslak > >> Morten >> >> white:~/svn/novalis morten$ rake spec >> (in /Users/morten/svn/novalis) >> /opt/local/bin/ruby >> -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" >> "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" >> "spec/controllers/account_controller_spec.rb" >> "spec/controllers/admin_controller_spec.rb" >> "spec/controllers/auhtenticate_controller_spec.rb" >> "spec/controllers/bar_controller_spec.rb" >> "spec/controllers/calendar_test_controller_spec.rb" >> "spec/controllers/manager_controller_spec.rb" >> "spec/controllers/reports_controller_spec.rb" >> "spec/controllers/stress_profiles_controller_spec.rb" >> "spec/controllers/therapist_controller_spec.rb" --options >> "/Users/morten/svn/novalis/config/../spec/spec.opts" >> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >> `gem_original_require': no such file to load -- spec/rails >> (MissingSourceFile) >> from >> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >> `require' >> from >> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in >> `require' >> from >> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in >> `new_constants_in' >> from >> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in >> `require' >> from ./spec/controllers/../spec_helper.rb:5 >> from ./spec/controllers/account_controller_spec.rb:1 >> >> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From dchelimsky at gmail.com Wed May 2 11:43:25 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 2 May 2007 10:43:25 -0500 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <4638B104.90708@kikobu.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> Message-ID: <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> On 5/2/07, Morten wrote: > aslak hellesoy wrote: > > On 5/2/07, Morten wrote: > >> Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. > >> I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: > >> > >> ruby script/plugin install > >> svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec > >> > >> When I try to run my specs though, I get the below error. It's as if the > >> spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is > >> part of the rspec plugin, but I'm using the gem and cannot find > >> spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging > >> my head against the walls. Things fall out. > >> > >> Any tips much appreciated. > >> > > > > Did you rerun script/generate rspec after upgrading? > > Yes. > > > Could you try to upgrade to RSpec 0.9.1? > > Hmm.. I tried that path but it changed a lot of specs to non-working. Did you read http://rspec.rubyforge.org/upgrade.html? > > Br, > > Morten > > > > > > > Aslak > > > >> Morten > >> > >> white:~/svn/novalis morten$ rake spec > >> (in /Users/morten/svn/novalis) > >> /opt/local/bin/ruby > >> -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" > >> "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" > >> "spec/controllers/account_controller_spec.rb" > >> "spec/controllers/admin_controller_spec.rb" > >> "spec/controllers/auhtenticate_controller_spec.rb" > >> "spec/controllers/bar_controller_spec.rb" > >> "spec/controllers/calendar_test_controller_spec.rb" > >> "spec/controllers/manager_controller_spec.rb" > >> "spec/controllers/reports_controller_spec.rb" > >> "spec/controllers/stress_profiles_controller_spec.rb" > >> "spec/controllers/therapist_controller_spec.rb" --options > >> "/Users/morten/svn/novalis/config/../spec/spec.opts" > >> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > >> `gem_original_require': no such file to load -- spec/rails > >> (MissingSourceFile) > >> from > >> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > >> `require' > >> from > >> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > >> `require' > >> from > >> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in > >> `new_constants_in' > >> from > >> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in > >> `require' > >> from ./spec/controllers/../spec_helper.rb:5 > >> from ./spec/controllers/account_controller_spec.rb:1 > >> > >> > >> > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > >> > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From lists at kikobu.com Wed May 2 12:03:26 2007 From: lists at kikobu.com (Morten) Date: Wed, 02 May 2007 18:03:26 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> Message-ID: <4638B64E.3060507@kikobu.com> Hope you don't get this message all 3 times I sent it, got a headache from all this and sent it from the wrong sender account :-) Found the problem (thanks to Yurii Rashkovskii). The plugin installation from http://rspec.rubyforge.org/documentation/rails/install.html doesn't work with the 0.8.2 SVN structure. white:~/tmp/kano morten$ ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails white:~/tmp/kano morten$ find vendor/plugins/rspec_on_rails/ -name "rails*" vendor/plugins/rspec_on_rails//public/images/rails.png vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/generators/rspec/templates/script/rails_spec_server vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails.rb vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/spec/rails vendor/plugins/rspec_on_rails//vendor/rails Using the following works better: piston import svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails/vendor/plugins/rspec_on_rails Br, Morten From dchelimsky at gmail.com Wed May 2 12:08:03 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 2 May 2007 11:08:03 -0500 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <4638B64E.3060507@kikobu.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> <4638B64E.3060507@kikobu.com> Message-ID: <57c63afe0705020908y4ca7c251i58fe2e2724741583@mail.gmail.com> On 5/2/07, Morten wrote: > > Hope you don't get this message all 3 times I sent it, got a headache > from all this and sent it from the wrong sender account :-) > > Found the problem (thanks to Yurii Rashkovskii). The plugin installation > from http://rspec.rubyforge.org/documentation/rails/install.html doesn't > work with the 0.8.2 SVN structure. > > white:~/tmp/kano morten$ ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails Read the bottom of that page. > > white:~/tmp/kano morten$ find vendor/plugins/rspec_on_rails/ -name "rails*" > vendor/plugins/rspec_on_rails//public/images/rails.png > vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/generators/rspec/templates/script/rails_spec_server > vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails > vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails.rb > vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/spec/rails > vendor/plugins/rspec_on_rails//vendor/rails > > Using the following works better: > > piston import > svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails/vendor/plugins/rspec_on_rails > > Br, > > Morten > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From morten at kikobu.com Wed May 2 11:59:38 2007 From: morten at kikobu.com (Morten Primdahl) Date: Wed, 02 May 2007 17:59:38 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> Message-ID: <4638B56A.9030409@kikobu.com> Found the problem (thanks to Yurii Rashkovskii). The plugin installation from http://rspec.rubyforge.org/documentation/rails/install.html doesn't work with the 0.8.2 SVN structure. white:~/tmp/kano morten$ ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails white:~/tmp/kano morten$ find vendor/plugins/rspec_on_rails/ -name "rails*" vendor/plugins/rspec_on_rails//public/images/rails.png vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/generators/rspec/templates/script/rails_spec_server vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails.rb vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/spec/rails vendor/plugins/rspec_on_rails//vendor/rails Using the following works better: piston import svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails/vendor/plugins/rspec_on_rails Br, Morten David Chelimsky wrote: > On 5/2/07, Morten wrote: >> aslak hellesoy wrote: >>> On 5/2/07, Morten wrote: >>>> Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. >>>> I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: >>>> >>>> ruby script/plugin install >>>> svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec >>>> >>>> When I try to run my specs though, I get the below error. It's as if the >>>> spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is >>>> part of the rspec plugin, but I'm using the gem and cannot find >>>> spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging >>>> my head against the walls. Things fall out. >>>> >>>> Any tips much appreciated. >>>> >>> Did you rerun script/generate rspec after upgrading? >> Yes. >> >>> Could you try to upgrade to RSpec 0.9.1? >> Hmm.. I tried that path but it changed a lot of specs to non-working. > > Did you read http://rspec.rubyforge.org/upgrade.html? > >> Br, >> >> Morten >> >> >> >>> Aslak >>> >>>> Morten >>>> >>>> white:~/svn/novalis morten$ rake spec >>>> (in /Users/morten/svn/novalis) >>>> /opt/local/bin/ruby >>>> -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" >>>> "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" >>>> "spec/controllers/account_controller_spec.rb" >>>> "spec/controllers/admin_controller_spec.rb" >>>> "spec/controllers/auhtenticate_controller_spec.rb" >>>> "spec/controllers/bar_controller_spec.rb" >>>> "spec/controllers/calendar_test_controller_spec.rb" >>>> "spec/controllers/manager_controller_spec.rb" >>>> "spec/controllers/reports_controller_spec.rb" >>>> "spec/controllers/stress_profiles_controller_spec.rb" >>>> "spec/controllers/therapist_controller_spec.rb" --options >>>> "/Users/morten/svn/novalis/config/../spec/spec.opts" >>>> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >>>> `gem_original_require': no such file to load -- spec/rails >>>> (MissingSourceFile) >>>> from >>>> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >>>> `require' >>>> from >>>> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in >>>> `require' >>>> from >>>> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in >>>> `new_constants_in' >>>> from >>>> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in >>>> `require' >>>> from ./spec/controllers/../spec_helper.rb:5 >>>> from ./spec/controllers/account_controller_spec.rb:1 >>>> >>>> >>>> >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From morten at kikobu.com Wed May 2 12:02:05 2007 From: morten at kikobu.com (Morten Primdahl) Date: Wed, 02 May 2007 18:02:05 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> Message-ID: <4638B5FD.3010100@kikobu.com> Found the problem (thanks to Yurii Rashkovskii). The plugin installation from http://rspec.rubyforge.org/documentation/rails/install.html doesn't work with the 0.8.2 SVN structure. white:~/tmp/kano morten$ ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails white:~/tmp/kano morten$ find vendor/plugins/rspec_on_rails/ -name "rails*" vendor/plugins/rspec_on_rails//public/images/rails.png vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/generators/rspec/templates/script/rails_spec_server vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/lib/spec/rails.rb vendor/plugins/rspec_on_rails//vendor/plugins/rspec_on_rails/spec/rails vendor/plugins/rspec_on_rails//vendor/rails Using the following works better: piston import svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails/vendor/plugins/rspec_on_rails Br, Morten From morten at kikobu.com Wed May 2 11:45:57 2007 From: morten at kikobu.com (Morten Primdahl) Date: Wed, 02 May 2007 17:45:57 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> Message-ID: <4638B235.7010005@kikobu.com> David Chelimsky wrote: > On 5/2/07, Morten wrote: >> aslak hellesoy wrote: >>> On 5/2/07, Morten wrote: >>>> Hi. I'm upgrading a project from an 0.8.0 pre-release gem to 0.8.2. >>>> I've installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin: >>>> >>>> ruby script/plugin install >>>> svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec >>>> >>>> When I try to run my specs though, I get the below error. It's as if the >>>> spec_helper cannot find "spec/rails". I've noticed that "spec/rails" is >>>> part of the rspec plugin, but I'm using the gem and cannot find >>>> spec/rails.rb (it's required in spec_helper.rb). I'm stuck and banging >>>> my head against the walls. Things fall out. >>>> >>>> Any tips much appreciated. >>>> >>> Did you rerun script/generate rspec after upgrading? >> Yes. >> >>> Could you try to upgrade to RSpec 0.9.1? >> Hmm.. I tried that path but it changed a lot of specs to non-working. > > Did you read http://rspec.rubyforge.org/upgrade.html? Yeah, the converter didn't work properly. I'll give it a shot and manually correct the specs. Br, Morten > >> Br, >> >> Morten >> >> >> >>> Aslak >>> >>>> Morten >>>> >>>> white:~/svn/novalis morten$ rake spec >>>> (in /Users/morten/svn/novalis) >>>> /opt/local/bin/ruby >>>> -I"/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib" >>>> "/opt/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" >>>> "spec/controllers/account_controller_spec.rb" >>>> "spec/controllers/admin_controller_spec.rb" >>>> "spec/controllers/auhtenticate_controller_spec.rb" >>>> "spec/controllers/bar_controller_spec.rb" >>>> "spec/controllers/calendar_test_controller_spec.rb" >>>> "spec/controllers/manager_controller_spec.rb" >>>> "spec/controllers/reports_controller_spec.rb" >>>> "spec/controllers/stress_profiles_controller_spec.rb" >>>> "spec/controllers/therapist_controller_spec.rb" --options >>>> "/Users/morten/svn/novalis/config/../spec/spec.opts" >>>> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >>>> `gem_original_require': no such file to load -- spec/rails >>>> (MissingSourceFile) >>>> from >>>> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in >>>> `require' >>>> from >>>> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in >>>> `require' >>>> from >>>> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in >>>> `new_constants_in' >>>> from >>>> /Users/morten/svn/novalis/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in >>>> `require' >>>> from ./spec/controllers/../spec_helper.rb:5 >>>> from ./spec/controllers/account_controller_spec.rb:1 >>>> >>>> >>>> >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From aslak.hellesoy at gmail.com Wed May 2 12:12:18 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Wed, 2 May 2007 18:12:18 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <4638B235.7010005@kikobu.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> <4638B235.7010005@kikobu.com> Message-ID: <8d961d900705020912j68b792a1o127b17e1ea88ddd6@mail.gmail.com> > > Did you read http://rspec.rubyforge.org/upgrade.html? > > Yeah, the converter didn't work properly. I'll give it a shot and > manually correct the specs. > If you tell us what you did and how it didn't work we may be able to improve it. Aslak > Br, > From lists at kikobu.com Wed May 2 12:12:34 2007 From: lists at kikobu.com (Morten) Date: Wed, 02 May 2007 18:12:34 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <57c63afe0705020908y4ca7c251i58fe2e2724741583@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> <4638B64E.3060507@kikobu.com> <57c63afe0705020908y4ca7c251i58fe2e2724741583@mail.gmail.com> Message-ID: <4638B872.6050501@kikobu.com> David Chelimsky wrote: > On 5/2/07, Morten wrote: >> Hope you don't get this message all 3 times I sent it, got a headache >> from all this and sent it from the wrong sender account :-) >> >> Found the problem (thanks to Yurii Rashkovskii). The plugin installation >> from http://rspec.rubyforge.org/documentation/rails/install.html doesn't >> work with the 0.8.2 SVN structure. >> >> white:~/tmp/kano morten$ ruby script/plugin install >> svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec_on_rails > > Read the bottom of that page. Ouch. Beers on me, and pardon the spam. Morten From lists at kikobu.com Wed May 2 12:21:06 2007 From: lists at kikobu.com (Morten) Date: Wed, 02 May 2007 18:21:06 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <8d961d900705020912j68b792a1o127b17e1ea88ddd6@mail.gmail.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> <4638B235.7010005@kikobu.com> <8d961d900705020912j68b792a1o127b17e1ea88ddd6@mail.gmail.com> Message-ID: <4638BA72.1070307@kikobu.com> aslak hellesoy wrote: >>> Did you read http://rspec.rubyforge.org/upgrade.html? >> Yeah, the converter didn't work properly. I'll give it a shot and >> manually correct the specs. >> > > If you tell us what you did and how it didn't work we may be able to improve it. In these 2 conversions the parenthesis are wrong: Before: controller.should_redirect_to 'http://not_existing_domain_for_novalis.test.host/404.html' After: controller.should be_redirect_to('http:)//not_existing_domain_for_novalis.test.host/404.html' Before: controller.should_redirect_to :subdomain => account.subdomain, :controller => 'authenticate', :action => 'login' After: controller.should be_redirect_to(:subdomain)=> account.subdomain, :controller => 'authenticate', :action => 'login' Br, Morten From aslak.hellesoy at gmail.com Wed May 2 12:49:34 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Wed, 2 May 2007 18:49:34 +0200 Subject: [rspec-users] RSpec 0.8.2 pain, missing spec/rails? In-Reply-To: <4638BA72.1070307@kikobu.com> References: <4638A84F.4030507@kikobu.com> <8d961d900705020839u4320cbffv372233faf9fd756c@mail.gmail.com> <4638B104.90708@kikobu.com> <57c63afe0705020843n1fef8e71re7ec9ecaa6666c2c@mail.gmail.com> <4638B235.7010005@kikobu.com> <8d961d900705020912j68b792a1o127b17e1ea88ddd6@mail.gmail.com> <4638BA72.1070307@kikobu.com> Message-ID: <8d961d900705020949y17d4b70fj26d7be703769685f@mail.gmail.com> On 5/2/07, Morten wrote: > aslak hellesoy wrote: > >>> Did you read http://rspec.rubyforge.org/upgrade.html? > >> Yeah, the converter didn't work properly. I'll give it a shot and > >> manually correct the specs. > >> > > > > If you tell us what you did and how it didn't work we may be able to improve it. > > In these 2 conversions the parenthesis are wrong: > > Before: > controller.should_redirect_to > 'http://not_existing_domain_for_novalis.test.host/404.html' > > After: > controller.should > be_redirect_to('http:)//not_existing_domain_for_novalis.test.host/404.html' > > Before: > controller.should_redirect_to :subdomain => account.subdomain, > :controller => 'authenticate', :action => 'login' > > After: > controller.should be_redirect_to(:subdomain)=> account.subdomain, > :controller => 'authenticate', :action => 'login' > Thanks a bunch. Another bug in the translator is plugged on trunk. Cheers, Aslak > Br, > > Morten > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Thu May 3 00:17:36 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Wed, 2 May 2007 23:17:36 -0500 Subject: [rspec-users] predicate matchers Message-ID: <57c63afe0705022117n1e53f10cyd78695d89072733e@mail.gmail.com> Hey all, If any of you are using the new predicate_matchers feature, I just committed a change to it in trunk. See http://rubyforge.org/tracker/index.php?func=detail&aid=10542&group_id=797&atid=3152 for more details, but the high level is that instead of this: predicate_matchers[:method_on_object] = :method_in_spec It now (as of rev 1898 - soon to be released in 0.9.2) does this: predicate_matchers[:method_in_spec] = :method_on_object I (and I'm apparently not alone) think this reads better. Here's an example: predicate_matchers[:eat] = :eats? sheep.should eat('grass') # passes if sheep.eats?('grass') Apologies for those of you who jumped on this feature. Hopefully it hasn't proven itself that useful yet ;) Cheers, David From jeff at jefdean.com Thu May 3 00:37:45 2007 From: jeff at jefdean.com (Jeff Dean) Date: Thu, 3 May 2007 00:37:45 -0400 Subject: [rspec-users] Note of praise Message-ID: <6586e070705022137n30b16b55l4188391d69b083b3@mail.gmail.com> I don't mean to litter the mailing list with junk, but I just wanted to say thanks to everyone who's been working on rspec for this release. I particularly like your attention to natural language and thorough documentation/examples. I'm not at the point yet where I can contribute much to the code side of things, but if there were a donate button I would use it. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070503/3bf0c181/attachment.html From mailing_lists at railsnewbie.com Thu May 3 01:05:24 2007 From: mailing_lists at railsnewbie.com (Scott Taylor) Date: Thu, 3 May 2007 01:05:24 -0400 Subject: [rspec-users] before method Message-ID: Would it be desirable to have before and after take a spec name as well as :each and :all? Scott From dchelimsky at gmail.com Thu May 3 01:08:45 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 3 May 2007 00:08:45 -0500 Subject: [rspec-users] before method In-Reply-To: References: Message-ID: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> On 5/3/07, Scott Taylor wrote: > > Would it be desirable to have before and after take a spec name as > well as :each and :all? What do YOU think? > > Scott > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From jeff at jefdean.com Thu May 3 02:46:26 2007 From: jeff at jefdean.com (Jeff Dean) Date: Thu, 3 May 2007 02:46:26 -0400 Subject: [rspec-users] before method In-Reply-To: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> References: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> Message-ID: <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> Having custom before statements might reduce readability a bit - I would argue that if you have many "it" statements that share a common setup, they probably deserve a separate context (a different known state). The shared context makes it possible to reduce duplication that might otherwise come from splitting up contexts, and basically does the same thing as custom before statements would do - only it keeps each context a little more atomic - IMO On 5/3/07, David Chelimsky wrote: > > On 5/3/07, Scott Taylor wrote: > > > > Would it be desirable to have before and after take a spec name as > > well as :each and :all? > > What do YOU think? > > > > > Scott > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070503/4f7cebf1/attachment.html From aslak.hellesoy at gmail.com Thu May 3 04:06:24 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 3 May 2007 10:06:24 +0200 Subject: [rspec-users] Note of praise In-Reply-To: <6586e070705022137n30b16b55l4188391d69b083b3@mail.gmail.com> References: <6586e070705022137n30b16b55l4188391d69b083b3@mail.gmail.com> Message-ID: <8d961d900705030106l657ae4f0h8a7a804ba4de973@mail.gmail.com> On 5/3/07, Jeff Dean wrote: > I don't mean to litter the mailing list with junk, but I just wanted to say > thanks to everyone who's been working on rspec for this release. I > particularly like your attention to natural language and thorough > documentation/examples. I'm not at the point yet where I can contribute > much to the code side of things, but if there were a donate button I would > use it. > Your praise is great contribution! Thanks a lot, Aslak > Jeff > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From aslak.hellesoy at gmail.com Thu May 3 04:11:28 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Thu, 3 May 2007 10:11:28 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.2 Message-ID: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> Behind every great release is a maintenance release. Go get it while it's hot. We've also reworked the website a little - trying to scare off fewer people. Aslak From mailing_lists at railsnewbie.com Thu May 3 04:16:58 2007 From: mailing_lists at railsnewbie.com (Scott Taylor) Date: Thu, 3 May 2007 04:16:58 -0400 Subject: [rspec-users] Note of praise In-Reply-To: <8d961d900705030106l657ae4f0h8a7a804ba4de973@mail.gmail.com> References: <6586e070705022137n30b16b55l4188391d69b083b3@mail.gmail.com> <8d961d900705030106l657ae4f0h8a7a804ba4de973@mail.gmail.com> Message-ID: <8BB64A47-906D-4D62-B1BA-0C99D2202C58@railsnewbie.com> On May 3, 2007, at 4:06 AM, aslak hellesoy wrote: > On 5/3/07, Jeff Dean wrote: >> I don't mean to litter the mailing list with junk, but I just >> wanted to say >> thanks to everyone who's been working on rspec for this release. I >> particularly like your attention to natural language and thorough >> documentation/examples. I'm not at the point yet where I can >> contribute >> much to the code side of things, but if there were a donate button >> I would >> use it. >> > > Your praise is great contribution! > > Thanks a lot, > Aslak Seriously, though, Aslak, (David, & co.): You should think about getting a paypal account. Not that you have to plaster it all over the rspec website and solicit donations...but if one wants to give, they should feel free to do so. You guys have worked hard on this thing, and it shows. If nothing else, it should at least buy you guys a treat every once in a while (a nice dinner, a well deserved trip to the bar...), or maybe it should help fund your trip to rails/ ruby conf. Scott From mlangenberg at gmail.com Thu May 3 04:39:20 2007 From: mlangenberg at gmail.com (Matthijs Langenberg) Date: Thu, 3 May 2007 10:39:20 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.2 In-Reply-To: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> References: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> Message-ID: <27c0ac6d0705030139i7387e744k6755699d92930a72@mail.gmail.com> Website looks pretty neat! Good job! On 5/3/07, aslak hellesoy wrote: > Behind every great release is a maintenance release. > Go get it while it's hot. > > We've also reworked the website a little - trying to scare off fewer people. > > Aslak > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Thu May 3 07:23:40 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 3 May 2007 06:23:40 -0500 Subject: [rspec-users] before method In-Reply-To: <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> References: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> Message-ID: <57c63afe0705030423n5627ba06pcb0dd3b3d9975b22@mail.gmail.com> On 5/3/07, Jeff Dean wrote: > Having custom before statements might reduce readability a bit - I would > argue that if you have many "it" statements that share a common setup, they > probably deserve a separate context (a different known state). The shared > context makes it possible to reduce duplication that might otherwise come > from splitting up contexts, and basically does the same thing as custom > before statements would do - only it keeps each context a little more atomic > - IMO Scott - I would agree w/ Jeff here, but I am interested to know what you had in my mind. > > > On 5/3/07, David Chelimsky wrote: > > On 5/3/07, Scott Taylor wrote: > > > > > > Would it be desirable to have before and after take a spec name as > > > well as :each and :all? > > > > What do YOU think? > > > > > > > > Scott > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From benilov at gmail.com Thu May 3 10:08:29 2007 From: benilov at gmail.com (Jake Benilov) Date: Thu, 3 May 2007 16:08:29 +0200 Subject: [rspec-users] [ANN] RSpec 0.9.2 In-Reply-To: <27c0ac6d0705030139i7387e744k6755699d92930a72@mail.gmail.com> References: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> <27c0ac6d0705030139i7387e744k6755699d92930a72@mail.gmail.com> Message-ID: <6fc165060705030708j5b610f9fj5d310b6cede4954d@mail.gmail.com> Is it me or is the installation page for Spec::Rails (http://rspec.rubyforge.org/documentation/rails/install.html) no longer accessible through the breadcrumb? I only found it through google ... On 5/3/07, Matthijs Langenberg wrote: > Website looks pretty neat! Good job! > > On 5/3/07, aslak hellesoy wrote: > > Behind every great release is a maintenance release. > > Go get it while it's hot. > > > > We've also reworked the website a little - trying to scare off fewer people. > > > > Aslak > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Thu May 3 10:13:23 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 3 May 2007 09:13:23 -0500 Subject: [rspec-users] [ANN] RSpec 0.9.2 In-Reply-To: <6fc165060705030708j5b610f9fj5d310b6cede4954d@mail.gmail.com> References: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> <27c0ac6d0705030139i7387e744k6755699d92930a72@mail.gmail.com> <6fc165060705030708j5b610f9fj5d310b6cede4954d@mail.gmail.com> Message-ID: <57c63afe0705030713k1458c8c7r7d5401b458e16b75@mail.gmail.com> On 5/3/07, Jake Benilov wrote: > Is it me or is the installation page for Spec::Rails > (http://rspec.rubyforge.org/documentation/rails/install.html) no > longer accessible through the breadcrumb? > I only found it through google ... The breadcrumbs on that page show you the path: Home >> Documentation >> Rails >> Install We'll make it more accessible though. Cheers, David > > > On 5/3/07, Matthijs Langenberg wrote: > > Website looks pretty neat! Good job! > > > > On 5/3/07, aslak hellesoy wrote: > > > Behind every great release is a maintenance release. > > > Go get it while it's hot. > > > > > > We've also reworked the website a little - trying to scare off fewer people. > > > > > > Aslak > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From t.lucas at toolmantim.com Thu May 3 10:16:02 2007 From: t.lucas at toolmantim.com (Tim Lucas) Date: Fri, 4 May 2007 00:16:02 +1000 Subject: [rspec-users] [ANN] RSpec 0.9.2 In-Reply-To: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> References: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> Message-ID: <9D1DCDA5-1B45-40D5-876D-26677713AF2C@toolmantim.com> On 03/05/2007, at 6:11 PM, aslak hellesoy wrote: > We've also reworked the website a little - trying to scare off > fewer people. Great work on the website. Can I give a spec for a small suggestion: TheRSpecWebsite - should take into account most visitors will be rails developers - should take into account many visitors will be using textmate - should have install & getting started instructions on the homepage that take the above into account - should at least provide links to those instructions if the homepage becomes cluttered -- tim From t.lucas at toolmantim.com Thu May 3 10:17:48 2007 From: t.lucas at toolmantim.com (Tim Lucas) Date: Fri, 4 May 2007 00:17:48 +1000 Subject: [rspec-users] [ANN] RSpec 0.9.2 In-Reply-To: <57c63afe0705030713k1458c8c7r7d5401b458e16b75@mail.gmail.com> References: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> <27c0ac6d0705030139i7387e744k6755699d92930a72@mail.gmail.com> <6fc165060705030708j5b610f9fj5d310b6cede4954d@mail.gmail.com> <57c63afe0705030713k1458c8c7r7d5401b458e16b75@mail.gmail.com> Message-ID: <846152AB-B876-4AA2-8502-E3F084EE0D5F@toolmantim.com> On 04/05/2007, at 12:13 AM, David Chelimsky wrote: > On 5/3/07, Jake Benilov wrote: >> Is it me or is the installation page for Spec::Rails >> (http://rspec.rubyforge.org/documentation/rails/install.html) no >> longer accessible through the breadcrumb? >> I only found it through google ... > > The breadcrumbs on that page show you the path: > > Home >> Documentation >> Rails >> Install > > We'll make it more accessible though. hah! Beat me by 2 minutes. Great news though :) -- tim From chris.c.hoffman at gmail.com Thu May 3 11:24:57 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Thu, 3 May 2007 11:24:57 -0400 Subject: [rspec-users] Breakpoint support Message-ID: <63c5d3820705030824m699092edi8664d4f36fbad2e@mail.gmail.com> Hello, Since release 0.9.x, I haven't been able to get breakpoint support fully working. I am able to execute a breakpoint, but I don't seem to have access to local variables when inside. Are others able to access these variables? -Chris From cwdinfo at gmail.com Thu May 3 12:23:28 2007 From: cwdinfo at gmail.com (s.ross) Date: Thu, 3 May 2007 09:23:28 -0700 Subject: [rspec-users] rSpec on CruiseControl.rb In-Reply-To: <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> References: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> Message-ID: Has anyone gotten CC to use rSpec as a builder? There was some comment on their list about this in February, but I wondered if anyone here is using CC (or is there some other ci tool that might be more suitable)? Thx From mlangenberg at gmail.com Thu May 3 12:45:06 2007 From: mlangenberg at gmail.com (Matthijs Langenberg) Date: Thu, 3 May 2007 18:45:06 +0200 Subject: [rspec-users] rSpec on CruiseControl.rb In-Reply-To: References: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> Message-ID: <27c0ac6d0705030945l6fb816d8m7ad305717e2eb49d@mail.gmail.com> I didn't have any troubles to get it working at all, I just created a Rakefile with a custom 'cruise' task: require 'rake' require 'spec/rake/spectask' task :cruise do Rake::Task["spec"].invoke end Spec::Rake::SpecTask.new do |t| t.spec_opts = ['-f s'] t.spec_files = 'SMSer_spec.rb' end What problems are you running into, or are you talking about a Rails project? On 5/3/07, s. ross wrote: > Has anyone gotten CC to use rSpec as a builder? There was some > comment on their list about this in February, but I wondered if > anyone here is using CC (or is there some other ci tool that might be > more suitable)? > > Thx > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From cowboysolitude at gmail.com Thu May 3 13:08:26 2007 From: cowboysolitude at gmail.com (J.D. Hollis) Date: Thu, 3 May 2007 13:08:26 -0400 Subject: [rspec-users] unexpected failures with --reverse Message-ID: I'm having trouble figuring out why one of my specs passes when run without --reverse and then fails with --reverse. What am I missing? I'm using the plugin versions of both rspec and rspec_on_rails 0.9.2. Here is the offending spec (Bill is an ActiveRecord model in a Rails app): ---------- describe Bill, " when valid" do def valid_bill_attributes { :uuid => "ec5e943f-a819-433b-b786-ee847bb144e2", :date => Date.today, :amount => Money.new(15000) } end it "should have a uuid" do bill = Bill.create(valid_bill_attributes) bill.uuid = nil bill.should have(2).errors_on(:uuid) end it "should have a uuid that is no longer than 36 characters" do bill = Bill.create(valid_bill_attributes) bill.uuid = bill.uuid + "1" bill.should have(1).error_on(:uuid) end it "should have a uuid that is no shorter than 36 characters" do bill = Bill.create(valid_bill_attributes) bill.uuid = bill.uuid[0..34] bill.should have(1).error_on(:uuid) end it "should have a case-insensitive, unique uuid" do bill = Bill.create(valid_bill_attributes) another = Bill.new(valid_bill_attributes) another.should have(1).error_on(:uuid) another.uuid = valid_bill_attributes[:uuid].upcase another.should have(1).error_on(:uuid) end it "should have a date" do bill = Bill.new(valid_bill_attributes.except(:date)) bill.should have(1).error_on(:date) end it "should have an amount_currency" do bill = Bill.new(valid_bill_attributes) bill.amount_currency = nil bill.should have(1).error_on(:amount_currency) end it "should have an amount_cents greater than 0" do bill = Bill.new(valid_bill_attributes) bill.amount_cents = 0 bill.should have(1).error_on(:amount_cents) bill.amount_cents = -2 bill.should have(1).error_on(:amount_cents) end end describe Bill do before(:each) do @bill = Bill.new @date = mock("date") end it "should return self.date.month when asked for :month" do month = mock("month") @bill.should_receive(:date).and_return(@date) @date.should_receive(:month).and_return(month) @bill.month.should == month end it "should return self.date.year when asked for :year" do year = mock("year") @bill.should_receive(:date).and_return(@date) @date.should_receive(:year).and_return(year) @bill.year.should == year end after(:each) do @bill = nil @date = nil end end ---------- And here is the output when I run the spec using the stock 0.9.2 spec.opts via 'spec -O spec/spec.opts spec/models/bill_spec.rb' (it also fails when I run it via 'rake spec:models'): ---------- FFFFFFFFF 1) NameError in 'Bill should return self.date.year when asked for :year' undefined method `date' for class `Bill' ./spec/models/bill_spec.rb:71: 2) NameError in 'Bill should return self.date.month when asked for :month' undefined method `date' for class `Bill' ./spec/models/bill_spec.rb:64: 3) NameError in 'Bill when valid should have an amount_cents greater than 0' undefined method `proxied_by_rspec__date' for class `Bill' 4) NameError in 'Bill when valid should have an amount_currency' undefined method `proxied_by_rspec__date' for class `Bill' 5) NameError in 'Bill when valid should have a date' undefined method `proxied_by_rspec__date' for class `Bill' 6) NameError in 'Bill when valid should have a case-insensitive, unique uuid' undefined method `proxied_by_rspec__date' for class `Bill' 7) NameError in 'Bill when valid should have a uuid that is no shorter than 36 characters' undefined method `proxied_by_rspec__date' for class `Bill' 8) NameError in 'Bill when valid should have a uuid that is no longer than 36 characters' undefined method `proxied_by_rspec__date' for class `Bill' 9) NameError in 'Bill when valid should have a uuid' undefined method `proxied_by_rspec__date' for class `Bill' ---------- From chris.c.hoffman at gmail.com Thu May 3 13:09:35 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Thu, 3 May 2007 13:09:35 -0400 Subject: [rspec-users] 0.9.2 redirect_to no longer accepts hash? Message-ID: <63c5d3820705031009j513265d6y3a76b717d2369533@mail.gmail.com> Why am I now getting these errors? expected redirect to {:action=>"index"}, got redirect to "http://test.host/authenticated_users" I know in the AuthenticatedUsersController, the redirect call is redirect_to :action => 'index' So why should I have to convert this to a url in my specs? From cowboysolitude at gmail.com Thu May 3 13:29:42 2007 From: cowboysolitude at gmail.com (J.D. Hollis) Date: Thu, 3 May 2007 13:29:42 -0400 Subject: [rspec-users] unexpected failures with --reverse Message-ID: Actually, nevermind. Figured it out. It seems that ActiveRecord is lazy in creating readers for model attributes, waiting until the attribute is accessed, so the mocking framework had no way to alias :date because it didn't exist as a method yet. Adding '@bill.date' to the before block seems to have resolved the issue. From cwdinfo at gmail.com Thu May 3 13:37:12 2007 From: cwdinfo at gmail.com (s.ross) Date: Thu, 3 May 2007 10:37:12 -0700 Subject: [rspec-users] rSpec on CruiseControl.rb In-Reply-To: <27c0ac6d0705030945l6fb816d8m7ad305717e2eb49d@mail.gmail.com> References: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> <27c0ac6d0705030945l6fb816d8m7ad305717e2eb49d@mail.gmail.com> Message-ID: It's Rails. I'm running the plugin version of rSpec but using cc invokes the gem version giving me a version mismatch. Any thoughts? Thx On May 3, 2007, at 9:45 AM, Matthijs Langenberg wrote: > I didn't have any troubles to get it working at all, I just created a > Rakefile with a custom 'cruise' task: > > require 'rake' > require 'spec/rake/spectask' > > task :cruise do > Rake::Task["spec"].invoke > end > > Spec::Rake::SpecTask.new do |t| > t.spec_opts = ['-f s'] > t.spec_files = 'SMSer_spec.rb' > end > > What problems are you running into, or are you talking about a > Rails project? > > On 5/3/07, s. ross wrote: >> Has anyone gotten CC to use rSpec as a builder? There was some >> comment on their list about this in February, but I wondered if >> anyone here is using CC (or is there some other ci tool that might be >> more suitable)? >> >> Thx >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From dchelimsky at gmail.com Thu May 3 13:57:17 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 3 May 2007 12:57:17 -0500 Subject: [rspec-users] 0.9.2 redirect_to no longer accepts hash? In-Reply-To: <63c5d3820705031009j513265d6y3a76b717d2369533@mail.gmail.com> References: <63c5d3820705031009j513265d6y3a76b717d2369533@mail.gmail.com> Message-ID: <57c63afe0705031057j1caca67awb4570df7311092da@mail.gmail.com> What is the spec that is failing? On 5/3/07, Chris Hoffman wrote: > Why am I now getting these errors? > > expected redirect to {:action=>"index"}, got redirect to > "http://test.host/authenticated_users" > > I know in the AuthenticatedUsersController, the redirect call is > > redirect_to :action => 'index' > > So why should I have to convert this to a url in my specs? > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From cwdinfo at gmail.com Thu May 3 14:30:25 2007 From: cwdinfo at gmail.com (s.ross) Date: Thu, 3 May 2007 11:30:25 -0700 Subject: [rspec-users] rSpec on CruiseControl.rb In-Reply-To: <27c0ac6d0705030945l6fb816d8m7ad305717e2eb49d@mail.gmail.com> References: <57c63afe0705022208v8772a17h6f8c5cb73d97370e@mail.gmail.com> <6586e070705022346n194182d6i479e1f4cc0a0bb7d@mail.gmail.com> <27c0ac6d0705030945l6fb816d8m7ad305717e2eb49d@mail.gmail.com> Message-ID: <1988E5FC-7374-49DA-B892-2A2D778E4E0A@gmail.com> I'll answer my own question. This seems to work ok: require File.join(RAILS_ROOT, '/vendor/plugins/rspec/lib/spec/rake/ spectask') task :cruise do Rake::Task["cruise_spec"].invoke end Spec::Rake::SpecTask.new(:cruise_spec) do |t| t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList['spec/**/*_spec.rb'] end The formatting isn't great, but it succeeds when it should and fails when a bad checkin is made. On May 3, 2007, at 9:45 AM, Matthijs Langenberg wrote: > I didn't have any troubles to get it working at all, I just created a > Rakefile with a custom 'cruise' task: > > require 'rake' > require 'spec/rake/spectask' > > task :cruise do > Rake::Task["spec"].invoke > end > > Spec::Rake::SpecTask.new do |t| > t.spec_opts = ['-f s'] > t.spec_files = 'SMSer_spec.rb' > end > > What problems are you running into, or are you talking about a > Rails project? > > On 5/3/07, s. ross wrote: >> Has anyone gotten CC to use rSpec as a builder? There was some >> comment on their list about this in February, but I wondered if >> anyone here is using CC (or is there some other ci tool that might be >> more suitable)? >> >> Thx >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From chris.c.hoffman at gmail.com Thu May 3 15:08:32 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Thu, 3 May 2007 15:08:32 -0400 Subject: [rspec-users] 0.9.2 redirect_to no longer accepts hash? In-Reply-To: <57c63afe0705031057j1caca67awb4570df7311092da@mail.gmail.com> References: <63c5d3820705031009j513265d6y3a76b717d2369533@mail.gmail.com> <57c63afe0705031057j1caca67awb4570df7311092da@mail.gmail.com> Message-ID: <63c5d3820705031208p5fc7d42dkb003690c45a80985@mail.gmail.com> Hi David, I'm sorry, I didn't set up my specs correctly again. It has just been difficult sorting through what was caused by the translator (I'm still migrating to 0.9.x) versus what I'm actually doing wrong. Sorry for my confused rant. -Chris On 5/3/07, David Chelimsky wrote: > What is the spec that is failing? > > On 5/3/07, Chris Hoffman wrote: > > Why am I now getting these errors? > > > > expected redirect to {:action=>"index"}, got redirect to > > "http://test.host/authenticated_users" > > > > I know in the AuthenticatedUsersController, the redirect call is > > > > redirect_to :action => 'index' > > > > So why should I have to convert this to a url in my specs? > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Thu May 3 15:11:56 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Thu, 3 May 2007 14:11:56 -0500 Subject: [rspec-users] 0.9.2 redirect_to no longer accepts hash? In-Reply-To: <63c5d3820705031208p5fc7d42dkb003690c45a80985@mail.gmail.com> References: <63c5d3820705031009j513265d6y3a76b717d2369533@mail.gmail.com> <57c63afe0705031057j1caca67awb4570df7311092da@mail.gmail.com> <63c5d3820705031208p5fc7d42dkb003690c45a80985@mail.gmail.com> Message-ID: <57c63afe0705031211y1225e363yd2d73af3fea7b197@mail.gmail.com> On 5/3/07, Chris Hoffman wrote: > Hi David, > I'm sorry, I didn't set up my specs correctly again. It has just > been difficult sorting through what was caused by the translator (I'm > still migrating to 0.9.x) versus what I'm actually doing wrong. Sorry > for my confused rant. No worries. The translator isn't perfect (that would have cost too much!) - so keep letting us know if we can help. Cheers, David > > -Chris > > On 5/3/07, David Chelimsky wrote: > > What is the spec that is failing? > > > > On 5/3/07, Chris Hoffman wrote: > > > Why am I now getting these errors? > > > > > > expected redirect to {:action=>"index"}, got redirect to > > > "http://test.host/authenticated_users" > > > > > > I know in the AuthenticatedUsersController, the redirect call is > > > > > > redirect_to :action => 'index' > > > > > > So why should I have to convert this to a url in my specs? > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From brian.takita at gmail.com Thu May 3 15:43:36 2007 From: brian.takita at gmail.com (Brian Takita) Date: Thu, 3 May 2007 12:43:36 -0700 Subject: [rspec-users] [rspec-devel] [ANN] RSpec 0.9.2 In-Reply-To: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> References: <8d961d900705030111q60a9f50cu4918f31502a45a54@mail.gmail.com> Message-ID: <1d7ddd110705031243r763c6d6dnb014b40a8e75ddcb@mail.gmail.com> Mmmm. Breadcrumbs! On 5/3/07, aslak hellesoy wrote: > > Behind every great release is a maintenance release. > Go get it while it's hot. > > We've also reworked the website a little - trying to scare off fewer > people. > > Aslak > _______________________________________________ > rspec-devel mailing list > rspec-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070503/0499cf43/attachment.html From marcus at ahnve.com Fri May 4 07:18:06 2007 From: marcus at ahnve.com (Marcus Ahnve) Date: Fri, 4 May 2007 13:18:06 +0200 Subject: [rspec-users] Capistrano and RSpec Message-ID: <4d4e79cc0705040418m75e2d72cr8346c6a2429de3ea@mail.gmail.com> I use Capistrano for deployment, and for reasons unknown to me, "cap migrate" requires the RSpec rake file. As RSpec is only loaded in the test environment, the migration fails. This may be a Capistrano question, but I figured I start here to see if anyone else has had the same problem. Cheers /Marcus -- http://marcus.ahnve.net From chris.c.hoffman at gmail.com Fri May 4 11:25:03 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Fri, 4 May 2007 11:25:03 -0400 Subject: [rspec-users] spec template for CRUD? Message-ID: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> Hello, Has anyone already come up with a set of shared behaviours that someone could leverage when adhering to a CRUD concept, with respect to controllers? Relatedly, it would be nice if there were a way to share generalized behaviour specs. -Chris From dchelimsky at gmail.com Fri May 4 11:33:05 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 4 May 2007 10:33:05 -0500 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> Message-ID: <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> On 5/4/07, Chris Hoffman wrote: > Hello, > > Has anyone already come up with a set of shared behaviours that > someone could leverage when adhering to a CRUD concept, with respect > to controllers? > > Relatedly, it would be nice if there were a way to share generalized > behaviour specs. Shared behaviours already allow you to do this, unless I'm missing your meaning. What is it that you're looking for that shared behaviours as/is doesn't cover? > > -Chris > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From chris.c.hoffman at gmail.com Fri May 4 11:37:52 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Fri, 4 May 2007 11:37:52 -0400 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> Message-ID: <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com> Oh there is nothing wrong with the code, I just wonder if anyone has actually taken it further and implemented the behaviours required to exercise the CRUD operations in controllers (e.g., #show, #new, #edit, etc.). And as to sharing, I mean in a colloquial way, as in collaboration. -Chris On 5/4/07, David Chelimsky wrote: > On 5/4/07, Chris Hoffman wrote: > > Hello, > > > > Has anyone already come up with a set of shared behaviours that > > someone could leverage when adhering to a CRUD concept, with respect > > to controllers? > > > > Relatedly, it would be nice if there were a way to share generalized > > behaviour specs. > > Shared behaviours already allow you to do this, unless I'm missing > your meaning. What is it that you're looking for that shared > behaviours as/is doesn't cover? > > > > > -Chris > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Fri May 4 11:51:28 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 4 May 2007 10:51:28 -0500 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com> Message-ID: <57c63afe0705040851i175e3fajd7f2a52993281a34@mail.gmail.com> On 5/4/07, Chris Hoffman wrote: > Oh there is nothing wrong with the code, I just wonder if anyone has > actually taken it further and implemented the behaviours required to > exercise the CRUD operations in controllers (e.g., #show, #new, #edit, > etc.). I understood that part - that you wanted to see if someone had tackled the problem. > > And as to sharing, I mean in a colloquial way, as in collaboration. This was the part I was talking about, and now I get it. Besides posting code on blogs, what would you propose to better enable this so that anybody who wants to contribute can, but everyone keeps control over their own contributions? Cheers, David > > -Chris > > On 5/4/07, David Chelimsky wrote: > > On 5/4/07, Chris Hoffman wrote: > > > Hello, > > > > > > Has anyone already come up with a set of shared behaviours that > > > someone could leverage when adhering to a CRUD concept, with respect > > > to controllers? > > > > > > Relatedly, it would be nice if there were a way to share generalized > > > behaviour specs. > > > > Shared behaviours already allow you to do this, unless I'm missing > > your meaning. What is it that you're looking for that shared > > behaviours as/is doesn't cover? > > > > > > > > -Chris > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From chris.c.hoffman at gmail.com Fri May 4 12:01:10 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Fri, 4 May 2007 12:01:10 -0400 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <57c63afe0705040851i175e3fajd7f2a52993281a34@mail.gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com> <57c63afe0705040851i175e3fajd7f2a52993281a34@mail.gmail.com> Message-ID: <63c5d3820705040901y35ec0229g8b855825591b5a76@mail.gmail.com> Well, I guess posting code on blogs is fine, as long as there is a centralized way of accessing this code. Perhaps some kind of aggregator would suffice? I don't know if sites like technorati or del.icio.us can help in this respect. My initial thought was a wiki, but if you think people will want to control their own contributions, than obviously this is a poor idea. -Chris On 5/4/07, David Chelimsky wrote: > On 5/4/07, Chris Hoffman wrote: > > Oh there is nothing wrong with the code, I just wonder if anyone has > > actually taken it further and implemented the behaviours required to > > exercise the CRUD operations in controllers (e.g., #show, #new, #edit, > > etc.). > > I understood that part - that you wanted to see if someone had tackled > the problem. > > > > > And as to sharing, I mean in a colloquial way, as in collaboration. > > This was the part I was talking about, and now I get it. Besides > posting code on blogs, what would you propose to better enable this so > that anybody who wants to contribute can, but everyone keeps control > over their own contributions? > > Cheers, > David > > > > > -Chris > > > > On 5/4/07, David Chelimsky wrote: > > > On 5/4/07, Chris Hoffman wrote: > > > > Hello, > > > > > > > > Has anyone already come up with a set of shared behaviours that > > > > someone could leverage when adhering to a CRUD concept, with respect > > > > to controllers? > > > > > > > > Relatedly, it would be nice if there were a way to share generalized > > > > behaviour specs. > > > > > > Shared behaviours already allow you to do this, unless I'm missing > > > your meaning. What is it that you're looking for that shared > > > behaviours as/is doesn't cover? > > > > > > > > > > > -Chris > > > > _______________________________________________ > > > > rspec-users mailing list > > > > rspec-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From chris.c.hoffman at gmail.com Fri May 4 15:17:08 2007 From: chris.c.hoffman at gmail.com (Chris Hoffman) Date: Fri, 4 May 2007 15:17:08 -0400 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <63c5d3820705040901y35ec0229g8b855825591b5a76@mail.gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com> <57c63afe0705040851i175e3fajd7f2a52993281a34@mail.gmail.com> <63c5d3820705040901y35ec0229g8b855825591b5a76@mail.gmail.com> Message-ID: <63c5d3820705041217n2978d885m445a7ef58d6d6331@mail.gmail.com> Hello, So, here is my first stab at generalized CRUD behaviours. I would appreciate your thoughts on my approach. Be gentle :) describe "RUD", :shared => true do before(:each) do @model = @controller_class.to_s.sub(/Controller$/,'').singularize.constantize @obj = mock_model(@model) end it "should populate the object related to the model when given a valid id" do @model.should_receive(:find_by_id).with('1').and_return(@obj) get @action, :id => 1 assigns[@model.to_s.underscore].should be(@obj) end it "should redirect_to #index when given an invalid id" do @model.should_receive(:find_by_id) get @action response.should redirect_to(:action => 'index') end it "should populate the flash with a message indicating that the record wasn't found, when given an invalid id" do @model.should_receive(:find_by_id) process @action flash[:notice].should == "#{@model} not found" end end describe "R", :shared => true do it "should render the appropriate template when given a valid id" do @model.should_receive(:find_by_id).and_return(@obj) get @action response.should render_template(@action) end it_should_behave_like "RUD" end describe "show", :shared => true do before(:each) do @action = "show" end it_should_behave_like "R" end On 5/4/07, Chris Hoffman wrote: > Well, I guess posting code on blogs is fine, as long as there is a > centralized way of accessing this code. Perhaps some kind of > aggregator would suffice? I don't know if sites like technorati or > del.icio.us can help in this respect. > > My initial thought was a wiki, but if you think people will want to > control their own contributions, than obviously this is a poor idea. > > -Chris > > On 5/4/07, David Chelimsky wrote: > > On 5/4/07, Chris Hoffman wrote: > > > Oh there is nothing wrong with the code, I just wonder if anyone has > > > actually taken it further and implemented the behaviours required to > > > exercise the CRUD operations in controllers (e.g., #show, #new, #edit, > > > etc.). > > > > I understood that part - that you wanted to see if someone had tackled > > the problem. > > > > > > > > And as to sharing, I mean in a colloquial way, as in collaboration. > > > > This was the part I was talking about, and now I get it. Besides > > posting code on blogs, what would you propose to better enable this so > > that anybody who wants to contribute can, but everyone keeps control > > over their own contributions? > > > > Cheers, > > David > > > > > > > > -Chris > > > > > > On 5/4/07, David Chelimsky wrote: > > > > On 5/4/07, Chris Hoffman wrote: > > > > > Hello, > > > > > > > > > > Has anyone already come up with a set of shared behaviours that > > > > > someone could leverage when adhering to a CRUD concept, with respect > > > > > to controllers? > > > > > > > > > > Relatedly, it would be nice if there were a way to share generalized > > > > > behaviour specs. > > > > > > > > Shared behaviours already allow you to do this, unless I'm missing > > > > your meaning. What is it that you're looking for that shared > > > > behaviours as/is doesn't cover? > > > > > > > > > > > > > > -Chris > > > > > _______________________________________________ > > > > > rspec-users mailing list > > > > > rspec-users at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > > > _______________________________________________ > > > > rspec-users mailing list > > > > rspec-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > From luislavena at gmail.com Fri May 4 18:47:21 2007 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 4 May 2007 19:47:21 -0300 Subject: [rspec-users] Custom Matcher and NAME NOT GENERATED annoyance Message-ID: <71166b3b0705041547o4aa18fbeu9990566106885408@mail.gmail.com> Hello RSpec users, Have been using RSpec since 0.8.2 (not too long ago, I must say). and been creating my custom matchers since was defined as "good practice". Also, auto-generated names for the examples is very helpful, I'm trying to take advantage of it. Since I often prior code/define all the "examples", I have created a few matchers to fulfill associations and validations of attributes. Example: describe "A User (in general)" do before(:each) do @user = User.new end it { @user.should have_many(:contest_public_votes) } it { @user.should have_many(:design_industry_user_interests) } it { @user.should have_one(:user_extension) } end That creates the following descriptions: A User (in general) - should has_many contest_public_votes - should has_many design_industry_user_interests - should has_one user_extension A new User - should not be valid without first_name - should not be valid without last_name - should not be valid without login - should not be valid without email - should not be valid without password - should not be valid without password_confirmation - should not be valid without city - should not be valid without postal_code - should not be valid without country - should not be valid with duplicate login - should not be valid with duplicate email (I omitted the second description). Anyway, the problem started with latest release, which if someone my matcher shows a problem, NAME NOT GENERATED was put in the description instead of my fancy, nicely done name ;-) Attached I have included a faulty matcher that shows the issue. If someone could point me in the right direction to patch rspec, I'll really apreciate. Is not critical, but is a bit "disturbing" during the matchers creation process ;-) Regards and thanks in advance, -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi -------------- next part -------------- A non-text attachment was scrubbed... Name: matcher_spec.rb Type: application/octet-stream Size: 980 bytes Desc: not available Url : http://rubyforge.org/pipermail/rspec-users/attachments/20070504/11cc961f/attachment.obj From aslak.hellesoy at gmail.com Fri May 4 19:30:40 2007 From: aslak.hellesoy at gmail.com (aslak hellesoy) Date: Sat, 5 May 2007 01:30:40 +0200 Subject: [rspec-users] Custom Matcher and NAME NOT GENERATED annoyance In-Reply-To: <71166b3b0705041547o4aa18fbeu9990566106885408@mail.gmail.com> References: <71166b3b0705041547o4aa18fbeu9990566106885408@mail.gmail.com> Message-ID: <8d961d900705041630l7e689539ud0cf634b6b8848a6@mail.gmail.com> This is a bug in RSpec. Could you file a bug report (for the record) while I'm fixing it please? Aslak On 5/5/07, Luis Lavena wrote: > Hello RSpec users, > > Have been using RSpec since 0.8.2 (not too long ago, I must say). and > been creating my custom matchers since was defined as "good practice". > > Also, auto-generated names for the examples is very helpful, I'm > trying to take advantage of it. > > Since I often prior code/define all the "examples", I have created a > few matchers to fulfill associations and validations of attributes. > Example: > > describe "A User (in general)" do > before(:each) do > @user = User.new > end > > it { @user.should have_many(:contest_public_votes) } > it { @user.should have_many(:design_industry_user_interests) } > it { @user.should have_one(:user_extension) } > end > > That creates the following descriptions: > > A User (in general) > - should has_many contest_public_votes > - should has_many design_industry_user_interests > - should has_one user_extension > > A new User > - should not be valid without first_name > - should not be valid without last_name > - should not be valid without login > - should not be valid without email > - should not be valid without password > - should not be valid without password_confirmation > - should not be valid without city > - should not be valid without postal_code > - should not be valid without country > - should not be valid with duplicate login > - should not be valid with duplicate email > > (I omitted the second description). > > Anyway, the problem started with latest release, which if someone my > matcher shows a problem, NAME NOT GENERATED was put in the description > instead of my fancy, nicely done name ;-) > > Attached I have included a faulty matcher that shows the issue. > > If someone could point me in the right direction to patch rspec, I'll > really apreciate. > > Is not critical, but is a bit "disturbing" during the matchers > creation process ;-) > > Regards and thanks in advance, > > -- > Luis Lavena > Multimedia systems > - > Leaders are made, they are not born. They are made by hard effort, > which is the price which all of us must pay to achieve any goal that > is worthwhile. > Vince Lombardi > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > From luislavena at gmail.com Fri May 4 19:35:42 2007 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 4 May 2007 20:35:42 -0300 Subject: [rspec-users] Custom Matcher and NAME NOT GENERATED annoyance In-Reply-To: <8d961d900705041630l7e689539ud0cf634b6b8848a6@mail.gmail.com> References: <71166b3b0705041547o4aa18fbeu9990566106885408@mail.gmail.com> <8d961d900705041630l7e689539ud0cf634b6b8848a6@mail.gmail.com> Message-ID: <71166b3b0705041635m32cfe267te306464271d47cd9@mail.gmail.com> On 5/4/07, aslak hellesoy wrote: > This is a bug in RSpec. Could you file a bug report (for the record) > while I'm fixing it please? > > Aslak > Filled :-) [#10594] Failing Custom Matcher show NAME NOT GENERATED description http://rubyforge.org/tracker/index.php?func=detail&aid=10594&group_id=797&atid=3149 Thank you Aslak for the quick reply. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi From jeff at jefdean.com Fri May 4 21:18:23 2007 From: jeff at jefdean.com (Jeff Dean) Date: Fri, 4 May 2007 21:18:23 -0400 Subject: [rspec-users] Translating tests Message-ID: <6586e070705041818m3d60ac0ci55ce72de138319c3@mail.gmail.com> Is test2spec still around? If so, are there any special instructions for running it against edge? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070504/bb164e29/attachment.html From crafterm at gmail.com Fri May 4 22:35:50 2007 From: crafterm at gmail.com (Marcus Crafter) Date: Sat, 5 May 2007 12:35:50 +1000 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <63c5d3820705041217n2978d885m445a7ef58d6d6331@mail.gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com> <57c63afe0705040851i175e3fajd7f2a52993281a34@mail.gmail.com> <63c5d3820705040901y35ec0229g8b855825591b5a76@mail.gmail.com> <63c5d3820705041217n2978d885m445a7ef58d6d6331@mail.gmail.com> Message-ID: <9B31C05A-0021-40A7-9C73-2B1F7FD7C3F0@gmail.com> Hi Chris, Looks good mate. Is there also a way of being able to get the name of the controller or some other variables into the 'it' strings to make the verbalisations read well for shared specs? like: it "should assign #{@model.to_s.underscore} for the view....." do ... end and so on, I tried the above, but no go yet. Cheers, Marcus On 05/05/2007, at 5:17 AM, Chris Hoffman wrote: > Hello, > > So, here is my first stab at generalized CRUD behaviours. I would > appreciate your thoughts on my approach. Be gentle :) > > describe "RUD", :shared => true do > before(:each) do > @model = @controller_class.to_s.sub(/Controller > $/,'').singularize.constantize > @obj = mock_model(@model) > end > > it "should populate the object related to the model when given a > valid id" do > @model.should_receive(:find_by_id).with('1').and_return(@obj) > get @action, :id => 1 > assigns[@model.to_s.underscore].should be(@obj) > end > > it "should redirect_to #index when given an invalid id" do > @model.should_receive(:find_by_id) > get @action > response.should redirect_to(:action => 'index') > end > > it "should populate the flash with a message indicating that the > record wasn't found, when given an invalid id" do > @model.should_receive(:find_by_id) > process @action > flash[:notice].should == "#{@model} not found" > end > end > > describe "R", :shared => true do > it "should render the appropriate template when given a valid id" do > @model.should_receive(:find_by_id).and_return(@obj) > get @action > response.should render_template(@action) > end > > it_should_behave_like "RUD" > end > > describe "show", :shared => true do > before(:each) do > @action = "show" > end > > it_should_behave_like "R" > end > > On 5/4/07, Chris Hoffman wrote: >> Well, I guess posting code on blogs is fine, as long as there is a >> centralized way of accessing this code. Perhaps some kind of >> aggregator would suffice? I don't know if sites like technorati or >> del.icio.us can help in this respect. >> >> My initial thought was a wiki, but if you think people will want to >> control their own contributions, than obviously this is a poor idea. >> >> -Chris >> >> On 5/4/07, David Chelimsky wrote: >>> On 5/4/07, Chris Hoffman wrote: >>>> Oh there is nothing wrong with the code, I just wonder if anyone >>>> has >>>> actually taken it further and implemented the behaviours >>>> required to >>>> exercise the CRUD operations in controllers (e.g., #show, #new, >>>> #edit, >>>> etc.). >>> >>> I understood that part - that you wanted to see if someone had >>> tackled >>> the problem. >>> >>>> >>>> And as to sharing, I mean in a colloquial way, as in collaboration. >>> >>> This was the part I was talking about, and now I get it. Besides >>> posting code on blogs, what would you propose to better enable >>> this so >>> that anybody who wants to contribute can, but everyone keeps control >>> over their own contributions? >>> >>> Cheers, >>> David >>> >>>> >>>> -Chris >>>> >>>> On 5/4/07, David Chelimsky wrote: >>>>> On 5/4/07, Chris Hoffman wrote: >>>>>> Hello, >>>>>> >>>>>> Has anyone already come up with a set of shared behaviours that >>>>>> someone could leverage when adhering to a CRUD concept, with >>>>>> respect >>>>>> to controllers? >>>>>> >>>>>> Relatedly, it would be nice if there were a way to share >>>>>> generalized >>>>>> behaviour specs. >>>>> >>>>> Shared behaviours already allow you to do this, unless I'm missing >>>>> your meaning. What is it that you're looking for that shared >>>>> behaviours as/is doesn't cover? >>>>> >>>>>> >>>>>> -Chris >>>>>> _______________________________________________ >>>>>> rspec-users mailing list >>>>>> rspec-users at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>>>> >>>>> _______________________________________________ >>>>> rspec-users mailing list >>>>> rspec-users at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>>> >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users From dchelimsky at gmail.com Fri May 4 22:57:45 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 4 May 2007 21:57:45 -0500 Subject: [rspec-users] autogenerated it (was 'Custom Matcher and NAME NOT GENERATED annoyance') Message-ID: <57c63afe0705041957s326b29d1ob6129d0aad57f826@mail.gmail.com> > On 5/5/07, Luis Lavena wrote: > > describe "A User (in general)" do > > before(:each) do > > @user = User.new > > end > > > > it { @user.should have_many(:contest_public_votes) } > > it { @user.should have_many(:design_industry_user_interests) } > > it { @user.should have_one(:user_extension) } > > end > > When I've used the autogenerated names, I've used specify: specify { @user.should have_many(:contest_public_votes) } specify { @user.should have_many(:design_industry_user_interests) } specify { @user.should have_one(:user_extension) } That reads better than 'it' in my view, but I'm not happy w/ 'specify' either. What other words would make sense in this situation? One thing that occurs to me in this particular example is 'the': describe User do the { @user.should have_many(:contest_public_votes) } the { @user.should have_many(:design_industry_user_interests) } the { @user.should have_one(:user_extension) } But I don't know if that would work that often. Other ideas? David From dchelimsky at gmail.com Fri May 4 22:58:08 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 4 May 2007 21:58:08 -0500 Subject: [rspec-users] Translating tests In-Reply-To: <6586e070705041818m3d60ac0ci55ce72de138319c3@mail.gmail.com> References: <6586e070705041818m3d60ac0ci55ce72de138319c3@mail.gmail.com> Message-ID: <57c63afe0705041958x3997ee68oa6f24691f7be007f@mail.gmail.com> On 5/4/07, Jeff Dean wrote: > Is test2spec still around? If so, are there any special instructions for > running it against edge? That died months and months ago. Sorry. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > From dchelimsky at gmail.com Fri May 4 22:59:33 2007 From: dchelimsky at gmail.com (David Chelimsky) Date: Fri, 4 May 2007 21:59:33 -0500 Subject: [rspec-users] spec template for CRUD? In-Reply-To: <9B31C05A-0021-40A7-9C73-2B1F7FD7C3F0@gmail.com> References: <63c5d3820705040825p9e9ddf9ud6c4d4574442cefc@mail.gmail.com> <57c63afe0705040833q409384b3xc43427ccb7efd59b@mail.gmail.com> <63c5d3820705040837y774ab2f9xb9d72aa03bfd1d96@mail.gmail.com>