I'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 "mock issue" goes, I don't think that was anything more than a suggestion. I don't foresee RSpec removing it'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> <<a href="mailto:mvyver@gmail.com">mvyver@gmail.com</a>> 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'm not a professional developer and I'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'm trying to write an db adapter for the og project.<br><br>I've being iterating with RSpec and it's exposed some unexpected<br>behavior in OG, and helped me to understand some of OGs behavior, but
<br>I'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'm puzzled by the following failure:<br><br>1)<br>'A default (DbiAdapter) connection to a new Og store should refer to<br>the default database in its 'name' attribute.' FAILED<br>
expected: :memory,<br> got: "test" (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. The 'got "test"' suggest it<br>was running a spec around the line numbers cited, but the describe
<br>'text' is out of sync.<br><br>I suspect I'm don't understand the scope and contexts of the rspec<br>components, or I may just be doing things back to front - I've read<br>the simple tutorials, but have found and more advanced "how to" just
<br>yet - I'd greatly appreciate any pointers/hints someone can offer.<br><br>There do seem to be some issues, such as 'you can't use an objects<br>method twice in a describe block', but I may be misunderstand
<br>something I'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'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'm missing something about how rspec works... one issue<br>that isn'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 'better' 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>