I have a project on edge rails that I''m trying to convert from Test:Unit to rspec. I have the rspec gem version 2338, the rspec and rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in vendor/rails. I''ve been able to get a few specs passing, have gotten the specs running from autotest, and am able to do "rake spec:doc" and get the basic command line spec printout. I''d like be able to generate the html spec printout, so I tried "spec spec --format html" but got the "undefined method `before'' for Spec::Rails::DSL::RailsExample:Class (NoMethodError)" mentioned in the "Autotest busted with Rspec/Rails trunk" thread from this forum. I was wondering if anyone else has been able to get the spec printouts working with edge rails and if so what versions of rails/rspec/rspec_on_rails were used. Thanks for your help, - Mark -- Posted via http://www.ruby-forum.com/.
I can''t get rspec to work with rails edge either, when I do "rake db:migrate RAILS_ENV=test" I get: undefined method `failure_message'' for class `Spec::Matchers::Have'' So I can''t even start working on my project :/ It works without rspec.
On Nov 8, 2007 7:06 PM, Patrick Aljord <patcito at gmail.com> wrote:> I can''t get rspec to work with rails edge either, when I do > "rake db:migrate RAILS_ENV=test" > > I get: > > undefined method `failure_message'' for class `Spec::Matchers::Have''That was due to a change in edge rails 8115, which broke rspec. It is now fixed - just update rspec to the current trunk.> > So I can''t even start working on my project :/ It works without rspec. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Ive just svn up and I still get the same error.
Patrick Aljord wrote:> Ive just svn up and I still get the same error. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >Did you svn up rspec_on_rails as well?
On Nov 8, 2007 7:38 PM, Patrick Aljord <patcito at gmail.com> wrote:> Ive just svn up and I still get the same error.I don''t know what to tell you - I just blew away vendor/rails, vendor/plugins/rspec and vendor/plugins/rspec_on_rails, reinstalled all three from their respective trunks and all is well. The problem was being caused by two files in the same location on the path: vendor/plugins/rspec/lib/spec/matchers/have.rb vendor/plugins/rspec_on_rails/lib/spec/matchers/have.rb The were both being seen as spec/matchers/have.rb. I moved the one in rspec_on_rails to a different location. Any chance the old one is still sitting around?> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
I did rm -rf both and now I get this: superclass mismatch for class TestResponse
On Nov 8, 2007 7:58 PM, Patrick Aljord <patcito at gmail.com> wrote:> I did rm -rf both and now I get this: > superclass mismatch for class TestResponseCan you provide a tiny bit more context than that? What command are you using? Stack trace?
sorry: rake db:migrate RAILS_ENV=test --trace (in /home/pat/catalogr) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! superclass mismatch for class TestResponse /home/pat/catalogr/vendor/rails/actionpack/lib/action_controller/test_process.rb:286 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:5 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:104:in `require_or_load'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'' /home/pat/catalogr/vendor/plugins/rspec_on_rails/lib/spec/extensions/action_view/base.rb:3 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/plugins/rspec_on_rails/lib/spec/extensions.rb:10 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/plugins/rspec/lib/spec.rb:7 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'' /home/pat/catalogr/vendor/plugins/rspec/init.rb:2:in `evaluate_init_rb'' /home/pat/catalogr/config/../vendor/rails/railties/lib/rails/plugin.rb:79:in `evaluate_init_rb'' /home/pat/catalogr/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'' /home/pat/catalogr/config/../vendor/rails/railties/lib/rails/plugin.rb:75:in `evaluate_init_rb'' /home/pat/catalogr/config/../vendor/rails/railties/lib/rails/plugin.rb:39:in `load'' /home/pat/catalogr/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins'' /home/pat/catalogr/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each'' /home/pat/catalogr/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins'' /home/pat/catalogr/config/../vendor/rails/railties/lib/initializer.rb:189:in `load_plugins'' /home/pat/catalogr/config/../vendor/rails/railties/lib/initializer.rb:105:in `process'' /home/pat/catalogr/config/../vendor/rails/railties/lib/initializer.rb:49:in `send'' /home/pat/catalogr/config/../vendor/rails/railties/lib/initializer.rb:49:in `run'' /home/pat/catalogr/config/environment.rb:13 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /home/pat/catalogr/vendor/rails/railties/lib/tasks/misc.rake:3 /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in `invoke_prerequisites'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in `invoke_prerequisites'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/bin/rake:16:in `load'' /usr/bin/rake:16
On Nov 8, 2007 8:07 PM, Patrick Aljord <patcito at gmail.com> wrote:> sorry: > > rake db:migrate RAILS_ENV=test --trace > (in /home/pat/catalogr) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > rake aborted! > superclass mismatch for class TestResponse > /home/pat/catalogr/vendor/rails/actionpack/lib/action_controller/test_process.rb:286That line reads like this: class TestResponse < AbstractResponse So it seems like there''s some other loading problem. Try and blow away the rspec plugins and run this migration and see if you still have trouble.
if I nuke the plugin i works: rake db:migrate RAILS_ENV=test (in /home/pat/catalogr) == 2 CreateBrands: migrating =================================================-- create_table(:brands) -> 0.2779s == 2 CreateBrands: migrated (0.2782s) =========================================
On Nov 8, 2007 8:18 PM, Patrick Aljord <patcito at gmail.com> wrote:> if I nuke the plugin i works: > > rake db:migrate RAILS_ENV=test > (in /home/pat/catalogr) > == 2 CreateBrands: migrating =================================================> -- create_table(:brands) > -> 0.2779s > == 2 CreateBrands: migrated (0.2782s) ========================================That''s hosed!!!! What other plugins do you have installed?> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Nothing its a fresh project with latest rails edge that i started to learn rspec.
On Nov 8, 2007 8:21 PM, Patrick Aljord <patcito at gmail.com> wrote:> Nothing its a fresh project with latest rails edge that i started to > learn rspec.Rails edge or 2.0 preview?
> Rails edge or 2.0 preview?edge at revision 8117.
On Nov 8, 2007 8:36 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> On Nov 8, 2007 8:21 PM, Patrick Aljord <patcito at gmail.com> wrote: > > Nothing its a fresh project with latest rails edge that i started to > > learn rspec. > > Rails edge or 2.0 preview? >I just did this: rails foo cd foo rake rails:freeze:edge ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails script/generate rspec rake db:create:all script/generate rspec_scaffold Thing name:string rake db:migrate rake spec All ran perfectly well. I really don''t know what''s going on on your machine.
ok works great :) maybe because I did the scaffold with an old version rspec? (the one from this morning), sounds weird though. anyway, Thanks a lot!
On Nov 9, 2007 3:40 AM, David Chelimsky <dchelimsky at gmail.com> wrote:> rails foo > cd foo > rake rails:freeze:edge > ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec > ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails > script/generate rspec > rake db:create:all > script/generate rspec_scaffold Thing name:string > rake db:migrate > rake spec > > All ran perfectly well. I really don''t know what''s going on on your machine. >but did you try to run ''rake db:migrate RAILS_ENV=test'' in your foo app? doesn''t work here.
On Nov 9, 2007 9:02 AM, Patrick Aljord <patcito at gmail.com> wrote:> On Nov 9, 2007 3:40 AM, David Chelimsky <dchelimsky at gmail.com> wrote: > > rails foo > > cd foo > > rake rails:freeze:edge > > ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec > > ruby script/plugin install > > svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails > > script/generate rspec > > rake db:create:all > > script/generate rspec_scaffold Thing name:string > > rake db:migrate > > rake spec > > > > All ran perfectly well. I really don''t know what''s going on on your machine. > > > > but did you try to run ''rake db:migrate RAILS_ENV=test'' in your foo > app? doesn''t work here.Ah - why are you doing that? rake spec takes care of setting up your test db.> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
ok then sorry. it''s all fine.
David Chelimsky wrote:> On Nov 8, 2007 8:36 PM, David Chelimsky <dchelimsky at gmail.com> wrote: >> On Nov 8, 2007 8:21 PM, Patrick Aljord <patcito at gmail.com> wrote: >> > Nothing its a fresh project with latest rails edge that i started to >> > learn rspec. >> >> Rails edge or 2.0 preview? >> > > I just did this: > > rails foo > cd foo > rake rails:freeze:edge > ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec > ruby script/plugin install > svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails > script/generate rspec > rake db:create:all > script/generate rspec_scaffold Thing name:string > rake db:migrate > rake spec > > All ran perfectly well. I really don''t know what''s going on on your > machine.Installing plugin from the url you provided fixed the issue. I had "undefined method `failure_message''" problem with plugin installed today from this url: svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails -- Posted via http://www.ruby-forum.com/.
On Nov 14, 2007 12:28 PM, Anton Kuzmin <lists at ruby-forum.com> wrote:> > David Chelimsky wrote: > > On Nov 8, 2007 8:36 PM, David Chelimsky <dchelimsky at gmail.com> wrote: > >> On Nov 8, 2007 8:21 PM, Patrick Aljord <patcito at gmail.com> wrote: > >> > Nothing its a fresh project with latest rails edge that i started to > >> > learn rspec. > >> > >> Rails edge or 2.0 preview? > >> > > > > I just did this: > > > > rails foo > > cd foo > > rake rails:freeze:edge > > ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec > > ruby script/plugin install > > svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails > > script/generate rspec > > rake db:create:all > > script/generate rspec_scaffold Thing name:string > > rake db:migrate > > rake spec > > > > All ran perfectly well. I really don''t know what''s going on on your > > machine. > > Installing plugin from the url you provided fixed the issue. I had > "undefined method `failure_message''" problem with plugin installed today > from this url: > svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_railshttp://rspec.rubyforge.org/documentation/rails/install.html CURRENT means the latest release, not the trunk. 1.0.8 was out months ago - obviously not compatible with subsequent changes to rails. Cheers, David
On Nov 14, 2007 12:32 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> http://rspec.rubyforge.org/documentation/rails/install.html > > CURRENT means the latest release, not the trunk. 1.0.8 was out months > ago - obviously not compatible with subsequent changes to rails. > > Cheers, > DavidI see people make this mistake fairly often. Is there any reason the tag shouldn''t be renamed to something less counter-intuitive? Thinking of FreeBSD''s tags, RELEASE perhaps? Kyle
On Nov 14, 2007 11:37 AM, Kyle Hargraves <philodespotos at gmail.com> wrote:> On Nov 14, 2007 12:32 PM, David Chelimsky <dchelimsky at gmail.com> wrote: > > http://rspec.rubyforge.org/documentation/rails/install.html > > > > CURRENT means the latest release, not the trunk. 1.0.8 was out months > > ago - obviously not compatible with subsequent changes to rails. > > > > Cheers, > > David > > I see people make this mistake fairly often. Is there any reason the > tag shouldn''t be renamed to something less counter-intuitive? > > Thinking of FreeBSD''s tags, RELEASE perhaps?+1
On Nov 14, 2007 8:37 PM, Kyle Hargraves <philodespotos at gmail.com> wrote:> On Nov 14, 2007 12:32 PM, David Chelimsky <dchelimsky at gmail.com> wrote: > > http://rspec.rubyforge.org/documentation/rails/install.html > > > > CURRENT means the latest release, not the trunk. 1.0.8 was out months > > ago - obviously not compatible with subsequent changes to rails. > > > > Cheers, > > David > > I see people make this mistake fairly often. Is there any reason the > tag shouldn''t be renamed to something less counter-intuitive? > > Thinking of FreeBSD''s tags, RELEASE perhaps? >LATEST_RELEASE would speak more for itself.> Kyle > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Mark McG. wrote:> I have a project on edge rails that I''m trying to convert from Test:Unit > to rspec. I have the rspec gem version 2338, the rspec and > rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in > vendor/rails. > > I''ve been able to get a few specs passing, have gotten the specs running > from autotest, and am able to do "rake spec:doc" and get the basic > command line spec printout. I''d like be able to generate the html spec > printout, so I tried "spec spec --format html" but got the "undefined > method `before'' for Spec::Rails::DSL::RailsExample:Class > (NoMethodError)" mentioned in the "Autotest busted with Rspec/Rails > trunk" thread from this forum. > > I was wondering if anyone else has been able to get the spec printouts > working with edge rails and if so what versions of > rails/rspec/rspec_on_rails were used. > > Thanks for your help, > - MarkI found in the rdocs that I can use: rake spec:doc SPEC_OPTS="--format html" > spec_doc.html I hope that helps someone, - Mark -- Posted via http://www.ruby-forum.com/.
much better: script/spec spec -fh > spec_doc.html Nate On Nov 14, 2007, at 7:10 PM, Mark McG. wrote:> Mark McG. wrote: >> I have a project on edge rails that I''m trying to convert from >> Test:Unit >> to rspec. I have the rspec gem version 2338, the rspec and >> rsepc_on_rails version 2831 in vendor/plugins, and rails version >> 8117 in >> vendor/rails. >> >> I''ve been able to get a few specs passing, have gotten the specs >> running >> from autotest, and am able to do "rake spec:doc" and get the basic >> command line spec printout. I''d like be able to generate the html >> spec >> printout, so I tried "spec spec --format html" but got the "undefined >> method `before'' for Spec::Rails::DSL::RailsExample:Class >> (NoMethodError)" mentioned in the "Autotest busted with Rspec/Rails >> trunk" thread from this forum. >> >> I was wondering if anyone else has been able to get the spec >> printouts >> working with edge rails and if so what versions of >> rails/rspec/rspec_on_rails were used. >> >> Thanks for your help, >> - Mark > > I found in the rdocs that I can use: > rake spec:doc SPEC_OPTS="--format html" > spec_doc.html > > I hope that helps someone, > - Mark > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users