# RSpec

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

[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:** 108

---

## [ZenTest-3.9.0 incompatible with RSpec-1.1.2](https://www.ruby-forum.com/t/zentest-3-9-0-incompatible-with-rspec-1-1-2/127687)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 11\
**Last updated:** [February 19, 2008, 6:21pm UTC](https://www.ruby-forum.com/t/zentest-3-9-0-incompatible-with-rspec-1-1-2/127687 "2008-02-19T18:21:16Z")

</div>

Hey all, Just a heads up that the ZenTest-3.9.0 release is not compatible with RSpec-1.1.2. I thought I had a release ready to go, but differences between a preview release of ZenTest that I received and the actual r…

---

## [Rspec\_controller generator for HAML?](https://www.ruby-forum.com/t/rspec-controller-generator-for-haml/129511)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 1\
**Last updated:** [February 19, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/rspec-controller-generator-for-haml/129511 "2008-02-19T12:27:12Z")

</div>

Is there currently an option to have the rspec\_controller generator generate haml instead of erb view files, and the corresponding spec? Thanks, Steve

---

## [File loading bug](https://www.ruby-forum.com/t/file-loading-bug/129478)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 3\
**Last updated:** [February 19, 2008, 6:21am UTC](https://www.ruby-forum.com/t/file-loading-bug/129478 "2008-02-19T06:21:01Z")

</div>

Not sure if this is rspec or autotest. When autotest is running, and I add new files in my rails project, it doesn’t notice. I have to restart autotest for it to start seeing them. Not the end of the world, just a sma…

---

## [Problem with testing for an exception from a controller method](https://www.ruby-forum.com/t/problem-with-testing-for-an-exception-from-a-controller-method/129423)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 8\
**Last updated:** [February 18, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/problem-with-testing-for-an-exception-from-a-controller-method/129423 "2008-02-18T14:53:09Z")

</div>

I have a User controller where users aren’t added with the usual new/create actions. I’m trying to set it so that it raises when ‘new’ is called but it doesn’t seem to be working - here’s the method, test and test r…

---

## [Can't get (r)spec to work in non-rails project](https://www.ruby-forum.com/t/cant-get-r-spec-to-work-in-non-rails-project/129309)

<div class="topic-metadata">

**Author:** [@Ivo\_D](https://www.ruby-forum.com/u/Ivo_D)\
**Replies:** 9\
**Last updated:** [February 18, 2008, 12:58pm UTC](https://www.ruby-forum.com/t/cant-get-r-spec-to-work-in-non-rails-project/129309 "2008-02-18T12:58:55Z")

</div>

Hi I can’t seem to get rspec and autotest to work in a small test project. The spec command doesn’t load the implementation file. I found some info about non-rails projects with rspec, but these did not solve my prob…

---

## [Uh... fixtures?](https://www.ruby-forum.com/t/uh-fixtures/129389)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 5\
**Last updated:** [February 18, 2008, 4:37am UTC](https://www.ruby-forum.com/t/uh-fixtures/129389 "2008-02-18T04:37:07Z")

</div>

RSpec-ers: I’m aware this is quite the FAQ. I have probably asked it myself, but I just can’t Google up anything but others asking it. I grabbed the source to Beast, to use as a Rails project uninfluenced by me, or …

---

## [Proposed deprecation](https://www.ruby-forum.com/t/proposed-deprecation/129372)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/proposed-deprecation/129372 "2008-02-17T20:54:47Z")

</div>

From Lighthouse - Beautifully Simple Issue Tracking (please comment there, not here). Cheers, David Proposed Deprecation: do not include modules implicitly As those of you using RSpec for Rails likely know, Rails …

---

## [Helpers in view specs](https://www.ruby-forum.com/t/helpers-in-view-specs/129349)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 4\
**Last updated:** [February 17, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/helpers-in-view-specs/129349 "2008-02-17T18:41:22Z")

</div>

I’m not sure of what the community stance is on this, but is there a builtin way to include helpers in view specs? Is this practice shunned? My thoughts on the matter are that I expect my views to have a specific outp…

---

## [\#describe behavior with a module](https://www.ruby-forum.com/t/describe-behavior-with-a-module/129335)

<div class="topic-metadata">

**Author:** [@pfharlock](https://www.ruby-forum.com/u/pfharlock)\
**Replies:** 3\
**Last updated:** [February 17, 2008, 7:09am UTC](https://www.ruby-forum.com/t/describe-behavior-with-a-module/129335 "2008-02-17T07:09:30Z")

</div>

Consider: module X def initialize(a) super() end end describe X do it “is a module” do X.should be\_instance\_of(Module) end end This generates an error because #describe tries to include X into the test harnes…

---

## [A case study on view specs](https://www.ruby-forum.com/t/a-case-study-on-view-specs/129329)

<div class="topic-metadata">

**Author:** [@zmoazeni](https://www.ruby-forum.com/u/zmoazeni)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/a-case-study-on-view-specs/129329 "2008-02-16T22:07:52Z")

</div>

I wanted to thank all the developers working a great testing framework. We switched to rspec on our last project, and haven’t looked back. I know testing views is a touchy subject for some. After having a surprisingl…

---

## [Failed specs spike autotest](https://www.ruby-forum.com/t/failed-specs-spike-autotest/129150)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 8\
**Last updated:** [February 16, 2008, 5:44am UTC](https://www.ruby-forum.com/t/failed-specs-spike-autotest/129150 "2008-02-16T05:44:14Z")

</div>

I’m getting some weird behavior. I’m currently running on trunk rspec/ rails, with 3.9.1 autotest. If a all tests succeed or are pending, autotest just sits there dutifully with the blinking cursor. If an example fail…

---

## [Re ducing frequency of autotest file checks](https://www.ruby-forum.com/t/re-ducing-frequency-of-autotest-file-checks/129207)

<div class="topic-metadata">

**Author:** [@21croissants](https://www.ruby-forum.com/u/21croissants)\
**Replies:** 1\
**Last updated:** [February 16, 2008, 5:37am UTC](https://www.ruby-forum.com/t/re-ducing-frequency-of-autotest-file-checks/129207 "2008-02-16T05:37:47Z")

</div>

I am using RSpec 1.1.3 with ZenTest-3.9.1 and I wanted to share my set up. If your cpu is at 100% when autotest is running and the fan noise is getting too much, don’t worry there’s something you can do. You can red…

---

## [Re: need to learn by example](https://www.ruby-forum.com/t/re-need-to-learn-by-example/129216)

<div class="topic-metadata">

**Author:** [@kiran1234](https://www.ruby-forum.com/u/kiran1234)\
**Replies:** 1\
**Last updated:** [February 15, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/re-need-to-learn-by-example/129216 "2008-02-15T18:16:13Z")

</div>

Hi, This is most USEFUL… Check this out… Thanks&Regards. Kiran. Chuck R.-3 wrote: languages) that are good examples of BDD in action. I learn best by example; this thread is for all the other lurkers who do too…

---

## [Test](https://www.ruby-forum.com/t/test/129220)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 15, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/test/129220 "2008-02-15T18:00:19Z")

</div>

test

---

## [Ticket #274 patch for --drb in spec.opts](https://www.ruby-forum.com/t/ticket-274-patch-for-drb-in-spec-opts/128697)

<div class="topic-metadata">

**Author:** [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Replies:** 1\
**Last updated:** [February 15, 2008, 5:27pm UTC](https://www.ruby-forum.com/t/ticket-274-patch-for-drb-in-spec-opts/128697 "2008-02-15T17:27:56Z")

</div>

Hi All, I submitted a patch last week to fix a bug with --drb not working if it’s specified in spec.opts, this causes autotest to run obscenely slowly out of the box on my machine. Please let me know if you need anyt…

---

## [Specdoc and taskpaper](https://www.ruby-forum.com/t/specdoc-and-taskpaper/129117)

<div class="topic-metadata">

**Author:** [@josephholsten](https://www.ruby-forum.com/u/josephholsten)\
**Replies:** 2\
**Last updated:** [February 15, 2008, 6:38am UTC](https://www.ruby-forum.com/t/specdoc-and-taskpaper/129117 "2008-02-15T06:38:10Z")

</div>

Hello there, I was wondering if anyone had looked at taskpaper? \[1\] They’ve got a vaguely yaml inspired format for todo lists. It reminded me of specdocs. I wonder how much work it would be to convert or build it in? …

---

## [Params are making my "should redirect\_to" test fail - why?](https://www.ruby-forum.com/t/params-are-making-my-should-redirect-to-test-fail-why/129036)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 13\
**Last updated:** [February 15, 2008, 6:10am UTC](https://www.ruby-forum.com/t/params-are-making-my-should-redirect-to-test-fail-why/129036 "2008-02-15T06:10:38Z")

</div>

I’m testing a controller action that redirects to a different action/view, sending through some params. In my test, i’m only specifying the controller and action that it should redirect to, but the additional params…

---

## [Wrong ZenTest being used?](https://www.ruby-forum.com/t/wrong-zentest-being-used/129180)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 1\
**Last updated:** [February 15, 2008, 5:51am UTC](https://www.ruby-forum.com/t/wrong-zentest-being-used/129180 "2008-02-15T05:51:19Z")

</div>

When I try to run autotest I get the following error: loading autotest/rails\_rspec /usr/local/lib/site\_ruby/1.8/rubygems.rb:319:in \`activate’: can’t activate ZenTest (= 3.7.1), already activated ZenTest-3.9.1\] (Gem::…

---

## [Spec'ing Rails request.env params](https://www.ruby-forum.com/t/specing-rails-request-env-params/129175)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 2\
**Last updated:** [February 15, 2008, 4:56am UTC](https://www.ruby-forum.com/t/specing-rails-request-env-params/129175 "2008-02-15T04:56:17Z")

</div>

I have an internal system that has a rails controller action that needs to behave differently based on browser type reported by request.env\[‘HTTP\_USER\_AGENT’\] But I can’t find a way to stub! mock or set this setting f…

---

## [Loosing params and request info in 'if' statements](https://www.ruby-forum.com/t/loosing-params-and-request-info-in-if-statements/129167)

<div class="topic-metadata">

**Author:** [@kane\_b](https://www.ruby-forum.com/u/kane_b)\
**Replies:** 0\
**Last updated:** [February 15, 2008, 1:37am UTC](https://www.ruby-forum.com/t/loosing-params-and-request-info-in-if-statements/129167 "2008-02-15T01:37:39Z")

</div>

Hi, I have been a bad TDD developer and developed before testing. My code is working fine, but I have been writing tests because it is the right thing to do. I am running into trouble with some controller methods tha…

---

## [How to mock an association](https://www.ruby-forum.com/t/how-to-mock-an-association/128770)

<div class="topic-metadata">

**Author:** [@bionicwillow](https://www.ruby-forum.com/u/bionicwillow)\
**Replies:** 3\
**Last updated:** [February 14, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/how-to-mock-an-association/128770 "2008-02-14T18:12:27Z")

</div>

I’ve got a “group” model that has a user\_id attribute and a validates\_existence\_of :user and validates\_presence\_of :user\_id validations. What method(s) do I need to stub on the User mock to intercept those validation …

---

## [Generated rspec video](https://www.ruby-forum.com/t/generated-rspec-video/128848)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [February 14, 2008, 6:49am UTC](https://www.ruby-forum.com/t/generated-rspec-video/128848 "2008-02-14T06:49:20Z")

</div>

Hi all! A sneak preview of what I’ve been doing with my patch that made it into rspec 1.1.3: http://chmeee.dyndns.org/ruby/R-Spec%20Demo.avi (2MB video) Remarks: this is a (not-too-comfortable) test of my program …

---

## [How to load fixtures for plugins with rspec tests](https://www.ruby-forum.com/t/how-to-load-fixtures-for-plugins-with-rspec-tests/129074)

<div class="topic-metadata">

**Author:** [@lfeistel](https://www.ruby-forum.com/u/lfeistel)\
**Replies:** 0\
**Last updated:** [February 14, 2008, 12:28am UTC](https://www.ruby-forum.com/t/how-to-load-fixtures-for-plugins-with-rspec-tests/129074 "2008-02-14T00:28:49Z")

</div>

Hello all, I had no trouble loading fixtures from the application’s base spec/fixtures directory, but I am working on a plugin which has its own rspec tests and fixtures. I am getting the rspec tests to run, but the…

---

## [How do I mock out the before :login\_required method?](https://www.ruby-forum.com/t/how-do-i-mock-out-the-before-login-required-method/128973)

<div class="topic-metadata">

**Author:** [@bionicwillow](https://www.ruby-forum.com/u/bionicwillow)\
**Replies:** 8\
**Last updated:** [February 14, 2008, 12:23am UTC](https://www.ruby-forum.com/t/how-do-i-mock-out-the-before-login-required-method/128973 "2008-02-14T00:23:32Z")

</div>

I have a GroupController class that inherits from a SecuredController which have a before filter (before\_filter :login\_required). This is using the restul authentication system. I want to mock out the login\_required m…

---

## [Example controller spec no worky?](https://www.ruby-forum.com/t/example-controller-spec-no-worky/129040)

<div class="topic-metadata">

**Author:** [@greenbox](https://www.ruby-forum.com/u/greenbox)\
**Replies:** 5\
**Last updated:** [February 13, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/example-controller-spec-no-worky/129040 "2008-02-13T21:53:08Z")

</div>

I’m trying to spec a dead simple “show non-existent record should render 404” case, but it seems the RecordNotFound exception is making it impossible for some reason. #controller def show @event = Event.find(params\[…

---

## [Need to learn by example](https://www.ruby-forum.com/t/need-to-learn-by-example/129010)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 1\
**Last updated:** [February 13, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/need-to-learn-by-example/129010 "2008-02-13T15:18:45Z")

</div>

I’m starting a new project which I would like to use as a learning opportunity for BDD. I’ve searched through the archives of this list for past pointers on web sites and books to peruse but I haven’t found very many …

---

## [Attachment\_fu and story runner, any updates](https://www.ruby-forum.com/t/attachment-fu-and-story-runner-any-updates/126742)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 5\
**Last updated:** [February 12, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-story-runner-any-updates/126742 "2008-02-12T22:12:37Z")

</div>

I’m trying to write a story for a Rails app which involves using the attachment\_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#6008…

---

## [RSpec 1.1.3 + ZenTest 3.9.1 + Rails 1.2.6 do NOT ignore folders ^vendor/\*](https://www.ruby-forum.com/t/rspec-1-1-3-zentest-3-9-1-rails-1-2-6-do-not-ignore-folders-vendor/128278)

<div class="topic-metadata">

**Author:** [@Jean-Michel\_Garnier](https://www.ruby-forum.com/u/Jean-Michel_Garnier)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/rspec-1-1-3-zentest-3-9-1-rails-1-2-6-do-not-ignore-folders-vendor/128278 "2008-02-12T18:12:55Z")

</div>

Hi, I just updated to the latest RSpec 1.1.3 + ZenTest 3.9.1. I also have rspec 1.1.3 installed as a gem When starting autotest with -v option, there is a lot of noise because autotest does not ignore the vendor fold…

---

## [Using RSpec to Story Test Java code](https://www.ruby-forum.com/t/using-rspec-to-story-test-java-code/128908)

<div class="topic-metadata">

**Author:** [@Robert\_Watkins](https://www.ruby-forum.com/u/Robert_Watkins)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 4:22pm UTC](https://www.ruby-forum.com/t/using-rspec-to-story-test-java-code/128908 "2008-02-12T16:22:03Z")

</div>

Hi, folks. I recently (ie on the weekend) came across RSpec, and knew it could be the answer to a problem I was looking into - story testing Java code. I’ve written up what I had to do to get it working at RSpec, JR…

---

## [Re: Generated rspec video](https://www.ruby-forum.com/t/re-generated-rspec-video/128858)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 10:19am UTC](https://www.ruby-forum.com/t/re-generated-rspec-video/128858 "2008-02-12T10:19:02Z")

</div>

Stuff for off-list: created with mencoder, I can play with mplayer. Reports on success or failure of other players welcome. weird codec combo… you should have used thedora or xvid at least :stuck\_out\_tongue: (can…

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

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