<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Hi Brian,</DIV><DIV>thank you for rspec on merb. hoping to follow your example, the starting point is simply merb and</DIV><DIV>mrblog at Revision 233 with the single change to spec_helper.rb for my local mrblog_test database</DIV><DIV>the only spec is the checked out user_spec.rb </DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite">Did you get any exceptions related to loading the fixtures?<BR style="">Are you using the fixtures method in the Behaviour block?</BLOCKQUOTE><DIV>there are no exceptions related to loading the fixtures the tables are not created  (see below)</DIV><DIV>user_spec.rb does use the fixture method in the Behavior block.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>output from a spec -b on this spec file is shown below with edits to reduce the length of this post.</DIV><DIV>let me know if i've missed something in my setup or if i can provide more information.</DIV><DIV>regards,</DIV><DIV>greg</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$ pwd</DIV><DIV>~/Sites/mrblog/trunk</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$ spec -v</DIV><DIV>RSpec-0.9.3 (r1916) - BDD for Ruby</DIV><DIV><FONT class="Apple-style-span" color="#0000EE"><SPAN class="Apple-style-span" style="text-decoration: underline;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV>$ spec -b test/spec/models/user_spec.rb      </DIV><DIV>merb init called</DIV><DIV>ActiveRecord session mixed in</DIV><DIV>Rails session compatibilty on.</DIV><DIV>FFFFFFFF</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>1)</DIV><DIV>ActiveRecord::StatementInvalid in 'User being authenticated should create user'</DIV><DIV>Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:243:in `execute'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:348:in `columns'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:763:in `columns'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:257:in `column_for'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:116:in `calculate'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:45:in `count'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/change.rb:28:in `send'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/change.rb:28:in `execute_change'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/change.rb:20:in `matches?'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/expectations/handler.rb:14:in `handle_matcher'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/expectations/extensions/object.rb:32:in `should'</DIV><DIV>./test/spec/models/user_spec.rb:8:</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in `instance_eval'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in `run_example'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:23:in `run'</DIV><DIV>/opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:21:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:70:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in `each'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:45:in `run_behaviours'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in `each'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in `run_behaviours'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:27:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/command_line.rb:17:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/bin/spec:3:</DIV><DIV>/opt/local/bin/spec:16:in `load'</DIV><DIV>/opt/local/bin/spec:16:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>2)</DIV><DIV>ActiveRecord::StatementInvalid in 'User being authenticated should require login'</DIV><DIV>Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>3)</DIV><DIV>ActiveRecord::StatementInvalid in 'User being authenticated should require password'</DIV><DIV>Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>4)</DIV><DIV>ActiveRecord::StatementInvalid in 'User being authenticated should require password confirmation'</DIV><DIV>Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>5)</DIV><DIV>ActiveRecord::StatementInvalid in 'User being authenticated should require email'</DIV><DIV>Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>6)</DIV><DIV>NoMethodError in 'User being authenticated should reset password'</DIV><DIV>undefined method `[]' for nil:NilClass</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:498:in `users'</DIV><DIV>./test/spec/models/user_spec.rb:32:</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in `instance_eval'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in `run_example'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:23:in `run'</DIV><DIV>/opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:21:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:70:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in `each'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:45:in `run_behaviours'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in `each'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in `run_behaviours'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:27:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/command_line.rb:17:in `run'</DIV><DIV>/opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/bin/spec:3:</DIV><DIV>/opt/local/bin/spec:16:in `load'</DIV><DIV>/opt/local/bin/spec:16:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>7)</DIV><DIV>NoMethodError in 'User being authenticated should not rehash password'</DIV><DIV>undefined method `[]' for nil:NilClass</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>8)</DIV><DIV>NoMethodError in 'User being authenticated should authenticate user'</DIV><DIV>undefined method `[]' for nil:NilClass</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Finished in 0.14894 seconds</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>8 examples, 8 failures</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On May 9, 2007, at 3:26 AM, Brian Takita wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Grag,<BR><BR>Thanks for trying the Rspec on Merb plugin out.<BR><BR>Did you get any exceptions related to loading the fixtures?<BR>Are you using the fixtures method in the Behaviour block?<BR><BR>Maybe it would be easier post your spec at: <BR><A href="http://pastie.caboo.se/">http://pastie.caboo.se/</A><BR>and reply with the link.<BR><BR>Thanks,<BR>Brian<BR><BR><DIV><SPAN class="gmail_quote">On 5/8/07, <B class="gmail_sendername">Gregory O'Connor</B> &lt; <A href="mailto:goconnor@plumtv.com">goconnor@plumtv.com</A>&gt; wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey Brian and Ezra, <BR>thank you both for this very interesting code.<BR>it's exciting to easily upload a couple of 1.5G files at the same time.<BR><BR>rake specs<BR>fails for me as the fixtures/users.yml is not loaded (after editing<BR> the test/spec/spec_helper.rb for my database).<BR><BR>also looking at why the progress bar doesn't work for me out of the<BR>box. of course the file upload ability is awesome.<BR><BR>regards,<BR>gregory o'connor<BR> &gt; On 5/4/07, Ezra Zygmuntowicz &lt;ez at <A href="http://engineyard.com">engineyard.com</A>&gt; wrote:<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; On May 4, 2007, at 3:29 PM, Brian Takita wrote:<BR>&gt; &gt;<BR>&gt; &gt; &gt; A couple days ago I submitted a patch, that was committed by Ezra, <BR>&gt; &gt; &gt; to the MrBlog project for the Rspec on Merb plugin.<BR>&gt; &gt; &gt; So far, it only works with ActiveRecord including fixtures.<BR>&gt; &gt; &gt; Has any played with it? If so, did you get it to work? <BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I'm going to be submitting a patch for Controller specs soon. It<BR>&gt; &gt; &gt; will be very bare bones, given my current lack of understanding of<BR>&gt; &gt; &gt; Merb controller development. <BR>&gt; &gt; &gt; View and Helper specs will follow.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I saw the question on IRC, but should ROM be folded into Merb<BR>&gt; &gt; &gt; itself, or act as a plugin? There are advantages and disadvantages <BR>&gt; &gt; &gt; to both.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; A pull to integrate classes into Merb is that these classes can be<BR>&gt; &gt; &gt; reused by Test::Unit tests and Rspec.<BR>&gt; &gt; &gt; A pull to keep classes in a plugin is It can change whenever Merb <BR>&gt; &gt; &gt; or Rspec changes. Since both Merb and Rspec are rapidly evolving,<BR>&gt; &gt; &gt; there may be a need for the plugin for a while.<BR>&gt; &gt; &gt; Since Test::Unit is fairly static, there may not be a need to make <BR>&gt; &gt; &gt; the Test::Unit library a plugin.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; One flaw with Rails, that I hope does not get repeated in Merb, is<BR>&gt; &gt; &gt; the tight coupling with Test;:Unit (same with tight coupling with <BR>&gt; &gt; &gt; Rspec). Of course Rspec did not exist when Rails was first<BR>&gt; &gt; &gt; developed, so this should not be much of a problem as long as we<BR>&gt; &gt; &gt; are vigilant. :)<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Brian <BR>&gt; &gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; Hey Brian-<BR>&gt; &gt;<BR>&gt; &gt;         I was able to get the user specs running in mrblog trunk. I<BR>&gt; &gt; commited<BR>&gt; &gt; a rake task to run them as 'rake specs'.  The presence of a spec <BR>&gt; &gt; harness makes the need for proper environments in merb urgent. I<BR>&gt; will<BR>&gt; &gt; hack up environments with different db settings this weekend so it<BR>&gt; &gt; will make testing and deving easier. <BR>&gt; &gt;<BR>&gt; &gt;         I think that we should keep it as a plugin for a little<BR>&gt; while. I<BR>&gt; &gt; don't want to go down the tightly coupled road in merb's testing<BR>&gt; &gt; capabilities. I think there are some core helper classes I need to <BR>&gt; &gt; write that could go in the framework and be used by test/unit or<BR>&gt; &gt; rspec or whatver. Like a helper for making requests thru the<BR>&gt; &gt; dispacther and controllers to test output without booting a <BR>&gt; &gt; webserver, and some other stuff that will help with testing.<BR>&gt; &gt;<BR>&gt; &gt;         I'd like to see the test helpers that are merb specific<BR>&gt; made into<BR>&gt; &gt; libraries within merb that you can use from test/unit, test/spec or <BR>&gt; &gt; rspec.<BR>&gt; &gt;<BR>&gt; &gt;         Thanks for getting this started Brian, it's a nice<BR>&gt; plugin. If you<BR>&gt; &gt; have any questions about merb internals please feel free to ask<BR>&gt; and I <BR>&gt; &gt; will help you grok it quickly.<BR>&gt;<BR>&gt;<BR>&gt; Great. Thanks Ezra.<BR>&gt;<BR>&gt; I submitted a patch for a frist stab at controller specs.<BR>&gt; <A href="http://merb.devjavu.com/projects/merb/ticket/45"> http://merb.devjavu.com/projects/merb/ticket/45</A><BR>&gt;<BR>&gt; Here are some things of consideration:<BR>&gt;<BR>&gt;    - response.should redirect_to and response.should<BR>&gt; render_template and<BR>&gt;    not implemented yet. <BR>&gt;    - The controller Description class has a controller_class<BR>&gt; accessor. If<BR>&gt;    the first argument of describe is set to the controller class,<BR>&gt; the examples<BR>&gt;    will know that the requests are for the controller. <BR>&gt;    - I couldn't figure out how to construct the correct uri given the<BR>&gt;    controller and the action.<BR>&gt;<BR>&gt;<BR>&gt; Cheers-<BR>&gt; &gt; -- Ezra Zygmuntowicz<BR>&gt; &gt; -- Lead Rails Evangelist <BR>&gt; &gt; -- ez at <A href="http://engineyard.com">engineyard.com</A><BR>&gt; &gt; -- Engine Yard, Serious Rails Hosting<BR>&gt; &gt; -- (866) 518-YARD (9273)<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR><BR><BR>_______________________________________________ <BR>Merb-devel mailing list<BR><A href="mailto:Merb-devel@rubyforge.org">Merb-devel@rubyforge.org</A><BR><A href="http://rubyforge.org/mailman/listinfo/merb-devel">http://rubyforge.org/mailman/listinfo/merb-devel</A><BR></BLOCKQUOTE> </DIV><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>