I&#39;m not really sure about your error, so hopefully someone more skilled than me can help you with that.<br><br>As far as the &quot;mock issue&quot; goes, I don&#39;t think that was anything more than a suggestion. I don&#39;t foresee RSpec removing it&#39;s built in mocking. If you want/need to use another mocking framework, I know that Mocha and RSpec play well. Not sure about FlexMock.
<br><br>Chris Pratt<br><br><br><div><span class="gmail_quote">On 9/11/07, <b class="gmail_sendername">Mark Van De Vyver</b> &lt;<a href="mailto:mvyver@gmail.com">mvyver@gmail.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;">
Hi,<br>Thanks for all the effort that has gone into making RSpec available.<br>I&#39;m not a professional developer and I&#39;ve found the approach<br>articulated has helped me a lot in writing my code, and understanding<br>
that of others.<br><br>To cut my teeth, I&#39;m trying to write an db adapter for the og project.<br><br>I&#39;ve being iterating with RSpec and it&#39;s exposed some unexpected<br>behavior in OG, and helped me to understand some of OGs behavior, but
<br>I&#39;ve hit a snag.....<br>Perhaps someone will be kind enough to point out why I see the 4<br>failures listed in the<br>attached log when I run the attached spec file, and even kinder to<br>suggest how I might get this working :)
<br><br>Specifically, I&#39;m puzzled by the following failure:<br><br>1)<br>&#39;A default (DbiAdapter) connection to a new Og store should refer to<br>the default database in its &#39;name&#39; attribute.&#39; FAILED<br>
expected: :memory,<br>&nbsp;&nbsp;&nbsp;&nbsp;got: &quot;test&quot; (using ==)<br>/usr/src/nitro-repo/og/test/og/adapter/dbi.rb:242:<br>/usr/src/nitro-repo/og/test/og/adapter/dbi.rb:318:<br><br>The text refers to the description of a set of expectatons far away
<br>from the lines references, in fact those line numbers refer to<br>different describe section altogether.&nbsp;&nbsp;The &#39;got &quot;test&quot;&#39; suggest it<br>was running a spec around the line numbers cited, but the describe
<br>&#39;text&#39; is out of sync.<br><br>I suspect I&#39;m don&#39;t understand the scope and contexts of the rspec<br>components, or I may just be doing things back to front - I&#39;ve read<br>the simple tutorials, but have found and more advanced &quot;how to&quot; just
<br>yet - I&#39;d greatly appreciate any pointers/hints someone can offer.<br><br>There do seem to be some issues, such as &#39;you can&#39;t use an objects<br>method twice in a describe block&#39;, but I may be misunderstand
<br>something I&#39;ve seen?<br><br>Anyway, hopefully it is not necessary, but if you need to run the spec<br>file I can try help you get OG to that point, but that could be tricky<br>- not all changes I&#39;ve made have been
<br>submitted or accepted yet.<br><br>Hopefully you can just see my error from a glance at the spec file?<br><br>Perhaps you can comment on what should be done differently to be<br>closer to rspec best-practice.<br>I think this is the first adapter spec file so can probably be used as
<br>a template for others in the project?<br><br>As I said, I suspect I&#39;m missing something about how rspec works... one issue<br>that isn&#39;t clear from the rspec site is the scope of variables in a<br>spec file...
<br><br>Final Q:<br>Has there been a resolution of the Mock issue, i.e will it rspec<br>implementation stay in rspec or not.<br>Which of mocha and flexmock are most compatible (i.e. work) with<br>rspec, or is there a &#39;better&#39; mock project to use with rspec.
<br><br>Appreciate any help or insight you can offer.<br><br>Regards<br>Mark<br><br>_______________________________________________<br>rspec-users mailing list<br><a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org
</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br><br></blockquote></div><br>