# RSpec

**URL:** https://www.ruby-forum.com/c/testing/rspec/25.md?page=117

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 118

---

## [Who's using --format rdoc](https://www.ruby-forum.com/t/whos-using-format-rdoc/119891)

<div class="topic-metadata">

**Author:** [@aslak\_hellesoy](https://www.ruby-forum.com/u/aslak_hellesoy)\
**Replies:** 4\
**Last updated:** [November 12, 2007, 1:22am UTC](https://www.ruby-forum.com/t/whos-using-format-rdoc/119891 "2007-11-12T01:22:56Z")

</div>

I’m doing some housekeeping and just realised that the rdoc formatter produces gibberish: http://rspec.rubyforge.org/rdoc/files/EXAMPLES\_rd.html Will anyone protest if I just go ahead and remove it? (I can’t imagine …

---

## [Be\_success misleading](https://www.ruby-forum.com/t/be-success-misleading/119799)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 2\
**Last updated:** [November 11, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/be-success-misleading/119799 "2007-11-11T14:45:52Z")

</div>

Just wondering if anyone else thinks that ‘response.should be\_success’ is potentially misleading. If you’re writing a spec for an action that is failing in some way it can still have a status 200. So while the HTTP r…

---

## [Autometric gem](https://www.ruby-forum.com/t/autometric-gem/119767)

<div class="topic-metadata">

**Author:** [@brblakley](https://www.ruby-forum.com/u/brblakley)\
**Replies:** 3\
**Last updated:** [November 10, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/autometric-gem/119767 "2007-11-10T14:46:05Z")

</div>

I’m working on tool to automatically run code metrics in the same way as autotest. It’s runs rcov, flog, and saikuro right now, and works with rspec and rails. It’s hosted at rubyforge: http://rubyforge.org/projects…

---

## [Plain Text Story example](https://www.ruby-forum.com/t/plain-text-story-example/119563)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 10\
**Last updated:** [November 8, 2007, 6:22pm UTC](https://www.ruby-forum.com/t/plain-text-story-example/119563 "2007-11-08T18:22:19Z")

</div>

Hey all, Does anyone have an example(s) of the plain text story runner for rails? I have read David’s blog (http://blog.davidchelimsky.net/articles/2007/10/22/plain-text-stories-on-rails) about it but I would like t…

---

## [Error on migration](https://www.ruby-forum.com/t/error-on-migration/119620)

<div class="topic-metadata">

**Author:** [@patcito](https://www.ruby-forum.com/u/patcito)\
**Replies:** 0\
**Last updated:** [November 8, 2007, 4:23pm UTC](https://www.ruby-forum.com/t/error-on-migration/119620 "2007-11-08T16:23:25Z")

</div>

Hi all, I’m just getting started with rspec. I’m using trunk rspec with edge rails. I get an error on migration though, here it is: rake db:migrate RAILS\_ENV=“test” --trace (in /home/pat/railsapp) \*\* Invoke db:migra…

---

## [Named routes raising nil.rewrite error](https://www.ruby-forum.com/t/named-routes-raising-nil-rewrite-error/119541)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 0\
**Last updated:** [November 7, 2007, 8:22pm UTC](https://www.ruby-forum.com/t/named-routes-raising-nil-rewrite-error/119541 "2007-11-07T20:22:08Z")

</div>

Hi all. I’m having a little problem with named routes. I have the following named route: map.with\_options :controller =\> ‘snippets’ do |map| map.snippets ‘faq/’, :action =\> ‘index’ …

---

## [LoadError when upgraded to latest rspec trunk](https://www.ruby-forum.com/t/loaderror-when-upgraded-to-latest-rspec-trunk/119523)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 1\
**Last updated:** [November 7, 2007, 6:48pm UTC](https://www.ruby-forum.com/t/loaderror-when-upgraded-to-latest-rspec-trunk/119523 "2007-11-07T18:48:31Z")

</div>

I just moved my rspec and rspec\_on\_rails plugin from r2691 to r2822. After that I upgraded both of them I regenerated all things rspec with the rspec generator. I was running on rails r2691 but upgraded to the latest…

---

## [RSpec, RESTful nested routes and :path\_prefix](https://www.ruby-forum.com/t/rspec-restful-nested-routes-and-path-prefix/119520)

<div class="topic-metadata">

**Author:** [@Harm\_Aarts](https://www.ruby-forum.com/u/Harm_Aarts)\
**Replies:** 0\
**Last updated:** [November 7, 2007, 5:58pm UTC](https://www.ruby-forum.com/t/rspec-restful-nested-routes-and-path-prefix/119520 "2007-11-07T17:58:09Z")

</div>

I think I did not express myself clear enough. The problem is that in my spec I can not get the ‘post’ and ‘get’ methods to correctly contact(by lack of a better word) the corresponding actions. I believe this has to …

---

## [Unexplainable failure...at least for me](https://www.ruby-forum.com/t/unexplainable-failure-at-least-for-me/119466)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 5\
**Last updated:** [November 7, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/unexplainable-failure-at-least-for-me/119466 "2007-11-07T16:00:04Z")

</div>

I have an address model with country\_id and province\_id fields There is also a full\_address method that returns an address that is in a format that the google maps api will be able to return a long-lat coords. Within…

---

## [Helper methods starting with should\_ get picked up as examples?](https://www.ruby-forum.com/t/helper-methods-starting-with-should-get-picked-up-as-examples/119481)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 1\
**Last updated:** [November 7, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/helper-methods-starting-with-should-get-picked-up-as-examples/119481 "2007-11-07T15:37:31Z")

</div>

Hi! I recently updated my rspec and rspec\_on\_rails plugins to the tip of the trunk and ran into an issue with helper methods with names starting with should\_ in my describe blocks. Fictive example to show what I’m ta…

---

## [Keeping Up with Trunk](https://www.ruby-forum.com/t/keeping-up-with-trunk/119431)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 2\
**Last updated:** [November 7, 2007, 12:07am UTC](https://www.ruby-forum.com/t/keeping-up-with-trunk/119431 "2007-11-07T00:07:12Z")

</div>

I have a project with rspec installed as a plugin using svn:externals. Here are my externals: rspec\_on\_rails svn://rubyforge.org/var/svn/rspec/trunk/ rspec\_on\_rails rspec svn://…

---

## [Keeping Up with Trunk](https://www.ruby-forum.com/t/keeping-up-with-trunk/196510)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 0\
**Last updated:** [November 6, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/keeping-up-with-trunk/196510 "2007-11-06T23:40:55Z")

</div>

I have a project with rspec installed as a plugin using svn:externals. Here are my externals: rspec\_on\_rails svn://rubyforge.org/var/svn/rspec/trunk/ rspec\_on\_rails rspec svn://…

---

## [Why is this view spec failing?](https://www.ruby-forum.com/t/why-is-this-view-spec-failing/119406)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 2\
**Last updated:** [November 6, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/why-is-this-view-spec-failing/119406 "2007-11-06T20:56:33Z")

</div>

I can’t figure out why I am getting a failure. It renders out fine in the browser. New member \<%= error\_messages\_for :member %\> \<% form\_for(:member, :url =\> members\_path) do |f| %\> Member Info First Name:…

---

## [Specifying mixins](https://www.ruby-forum.com/t/specifying-mixins/118929)

<div class="topic-metadata">

**Author:** [@tomx](https://www.ruby-forum.com/u/tomx)\
**Replies:** 8\
**Last updated:** [November 6, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/specifying-mixins/118929 "2007-11-06T16:31:30Z")

</div>

Hi folks, Can anyone share some accumulated wisdom about the best way to spec mixins in general, and (Jamis B.-style) ActiveRecord “concerns” in particular? The standard situation here is that there’s a bunch of func…

---

## [Writing controller specs](https://www.ruby-forum.com/t/writing-controller-specs/118972)

<div class="topic-metadata">

**Author:** [@Hans\_de\_Graaff](https://www.ruby-forum.com/u/Hans_de_Graaff)\
**Replies:** 2\
**Last updated:** [November 5, 2007, 5:38pm UTC](https://www.ruby-forum.com/t/writing-controller-specs/118972 "2007-11-05T17:38:12Z")

</div>

One thing that is bothering me about my controller specs is that sometimes I end up with a number of examples that are the same except for the example name. The reason that this happens is that I’ve expressed all the …

---

## [RSpec, RESTful nested routes and :path\_prefix](https://www.ruby-forum.com/t/rspec-restful-nested-routes-and-path-prefix/119043)

<div class="topic-metadata">

**Author:** [@Harm\_Aarts](https://www.ruby-forum.com/u/Harm_Aarts)\
**Replies:** 4\
**Last updated:** [November 5, 2007, 9:55am UTC](https://www.ruby-forum.com/t/rspec-restful-nested-routes-and-path-prefix/119043 "2007-11-05T09:55:52Z")

</div>

Dear list, In the app we are making we have a rout something like this: map.resources :projects do |projects| projects.resources :pages, :controller =\>“Wiki::Pages”, :path\_prefix =\> “/projects/:project\_id/ wiki”, :n…

---

## [Specing raising error, handling, and then not raising error](https://www.ruby-forum.com/t/specing-raising-error-handling-and-then-not-raising-error/119174)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 12:52am UTC](https://www.ruby-forum.com/t/specing-raising-error-handling-and-then-not-raising-error/119174 "2007-11-05T00:52:17Z")

</div>

Hey guys and gals, I have a snippet of code: Net::SMTP(@host, @port, @from\_domain) do |smtp| @emails.each do |email| begin smtp.send\_message email.encoded, email.from, email.destinations @emails\_sent += 1 rescue E…

---

## [Test that controller includes helpers?](https://www.ruby-forum.com/t/test-that-controller-includes-helpers/119082)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 2\
**Last updated:** [November 3, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/test-that-controller-includes-helpers/119082 "2007-11-03T16:26:12Z")

</div>

Is there an easy way to spec that a controller should include helpers other than its own? I was thinking I could just spec responds\_to for methods I’m interested in in the view, but that seems like crossing a separati…

---

## [Can't delete app/helpers](https://www.ruby-forum.com/t/cant-delete-app-helpers/118983)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 5\
**Last updated:** [November 3, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/cant-delete-app-helpers/118983 "2007-11-03T13:51:49Z")

</div>

I would like to remove some unused helpers from the app/helpers dir, but when I do so my specs fail. Why is this? I don’t see where those helpers are referenced within the tests. Is there a way to delete these unused…

---

## [Specs for Helpers that call render](https://www.ruby-forum.com/t/specs-for-helpers-that-call-render/119095)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 1\
**Last updated:** [November 3, 2007, 6:47am UTC](https://www.ruby-forum.com/t/specs-for-helpers-that-call-render/119095 "2007-11-03T06:47:16Z")

</div>

The helper spec I am writing tests a helper method that calls render. module HelperHelper def render\_partial render :partial =\> ‘partial’ end end The helper spec. describe HelperHelper do it “should render par…

---

## [Stub calls to an instance method before it is created?](https://www.ruby-forum.com/t/stub-calls-to-an-instance-method-before-it-is-created/119112)

<div class="topic-metadata">

**Author:** [@Shane\_W](https://www.ruby-forum.com/u/Shane_W)\
**Replies:** 1\
**Last updated:** [November 3, 2007, 6:39am UTC](https://www.ruby-forum.com/t/stub-calls-to-an-instance-method-before-it-is-created/119112 "2007-11-03T06:39:05Z")

</div>

I am desperately in need of functionality such as Mocha offers with their any\_instance method. I see that there is an open ticket for a similar feature in RSpec, but it does not look like anything have been done. Is …

---

## [Autotest debugger?](https://www.ruby-forum.com/t/autotest-debugger/118920)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 3\
**Last updated:** [November 2, 2007, 6:22pm UTC](https://www.ruby-forum.com/t/autotest-debugger/118920 "2007-11-02T18:22:19Z")

</div>

Hi, I keep facing problems with autotest, and I don’t know what’s happening in the background, is there anyway to know what’s happening while testing? Example: @user = User.new @user.email = “testcom” @user.errors…

---

## [No speed up with spec\_server](https://www.ruby-forum.com/t/no-speed-up-with-spec-server/118981)

<div class="topic-metadata">

**Author:** [@jeremysarda](https://www.ruby-forum.com/u/jeremysarda)\
**Replies:** 3\
**Last updated:** [November 2, 2007, 2:16am UTC](https://www.ruby-forum.com/t/no-speed-up-with-spec-server/118981 "2007-11-02T02:16:38Z")

</div>

Hey guys, I’m running spec\_server and using --drb with my specs in Rails, and I’m seeing virtually no speed up. I’m using rspec/rspec\_on\_rails trunk. Is there something I’m doing wrong? TIA, Jeremy

---

## [Rake spec:rcov failing](https://www.ruby-forum.com/t/rake-spec-rcov-failing/118491)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 3\
**Last updated:** [November 1, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/rake-spec-rcov-failing/118491 "2007-11-01T21:25:28Z")

</div>

Running rails 1.2.3, rcov (0.8.0.2), rspec trunk (2865) - When running rake spec:rcov, I’m getting the following: Finished in 245.717813 seconds 856 examples, 0 failures, 48 pending /usr/local/lib/ruby/1.8/rexml/text…

---

## [Rspec Release Plan (was Am I missing something with Heckle?)](https://www.ruby-forum.com/t/rspec-release-plan-was-am-i-missing-something-with-heckle/118852)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 5\
**Last updated:** [November 1, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/rspec-release-plan-was-am-i-missing-something-with-heckle/118852 "2007-11-01T20:15:09Z")

</div>

On Oct 31, 2007 11:36 AM, Scott T. removed\_email\_address@domain.invalid wrote: When can we expect the next release of rspec? Definitely by the end of November. Likely by mid-November. Hopefully in a matter of days…

---

## [Can't use #exactly when #and\_return influences it](https://www.ruby-forum.com/t/cant-use-exactly-when-and-return-influences-it/118922)

<div class="topic-metadata">

**Author:** [@pangel](https://www.ruby-forum.com/u/pangel)\
**Replies:** 2\
**Last updated:** [November 1, 2007, 1:55pm UTC](https://www.ruby-forum.com/t/cant-use-exactly-when-and-return-influences-it/118922 "2007-11-01T13:55:22Z")

</div>

I want my class Reader to loop on the content of its Stack until false is returned. I also want an optional argument to exist that limits how many times the stack will be read, even if some elements are left. I was t…

---

## [A better way to stub out constants](https://www.ruby-forum.com/t/a-better-way-to-stub-out-constants/118565)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 4\
**Last updated:** [November 1, 2007, 4:40am UTC](https://www.ruby-forum.com/t/a-better-way-to-stub-out-constants/118565 "2007-11-01T04:40:44Z")

</div>

Hi Something that’s gnawing at me… to avoid using the SQLite3 gem I’m stubbing it out like this: before(:each) do @database = mock("SQLite3 database") SQLite3 = Module.new SQLite3::Database = Class.new S…

---

## [Facets and/or Nested Describes](https://www.ruby-forum.com/t/facets-and-or-nested-describes/118699)

<div class="topic-metadata">

**Author:** [@bct](https://www.ruby-forum.com/u/bct)\
**Replies:** 1\
**Last updated:** [November 1, 2007, 2:27am UTC](https://www.ruby-forum.com/t/facets-and-or-nested-describes/118699 "2007-11-01T02:27:26Z")

</div>

I have to confess that I did not know about facets before reading Ashley M.'s post: http://aviewfromafar.net/2007/10/21/quick-and-dirty-facets-in-rspec-trunk Not knowing about the facets solution, I made a couple of f…

---

## [Heckle rake task](https://www.ruby-forum.com/t/heckle-rake-task/118889)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 0\
**Last updated:** [November 1, 2007, 1:44am UTC](https://www.ruby-forum.com/t/heckle-rake-task/118889 "2007-11-01T01:44:48Z")

</div>

Fellow hecklers, Just spent a while getting this working. Turns out heckle will heckle a whole module and sub-modules with one call, so with a bit of string matching, you can build a nice tool to heckle your whole ap…

---

## [Am I missing something with Heckle?](https://www.ruby-forum.com/t/am-i-missing-something-with-heckle/118795)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 16\
**Last updated:** [October 31, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/am-i-missing-something-with-heckle/118795 "2007-10-31T22:26:41Z")

</div>

Hi I can’t get heckle working. In fact, I’ve built an example so simple that it either shows a bug, or I am being really, REALLY stupid. Heckle does not appear to support RSpec directly, so I’m trying to use spec --…

[Previous page](https://www.ruby-forum.com/c/testing/rspec/25.md?page=116)

[Next page](https://www.ruby-forum.com/c/testing/rspec/25.md?page=118)
