# RSpec

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

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

---

## [Is there a plain format output for stories?](https://www.ruby-forum.com/t/is-there-a-plain-format-output-for-stories/142461)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/is-there-a-plain-format-output-for-stories/142461 "2008-07-08T17:13:59Z")

</div>

When running a lot of stories from a script it would be nice to have the plain format of dots rather than the verbose story descriptions. Is there a way to do this? I tried -f p but it ignored it. Thanks

---

## [If a step fails the scenario has a class name of "passed"](https://www.ruby-forum.com/t/if-a-step-fails-the-scenario-has-a-class-name-of-passed/142505)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 0\
**Last updated:** [July 8, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/if-a-step-fails-the-scenario-has-a-class-name-of-passed/142505 "2008-07-08T17:12:12Z")

</div>

Hi, Post-story HTML creation if a step within a scenario fails (class=“failed”) that scenario still passes ( class=“passed”). We have added some javascript to rspec.js var rspec = { load : function() { $$(".passed"…

---

## [Colorize story output](https://www.ruby-forum.com/t/colorize-story-output/142424)

<div class="topic-metadata">

**Author:** [@Paolo\_DonSSSS](https://www.ruby-forum.com/u/Paolo_DonSSSS)\
**Replies:** 7\
**Last updated:** [July 8, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/colorize-story-output/142424 "2008-07-08T16:01:55Z")

</div>

Hi guys, running large story files I started missing the red/green output of my specs. Thus I wrote a small scripthttp://github.com/paolodona/scripts/tree/master/colorizeyou can pipe the story output to, in order to…

---

## [Strange behaviour with pending specs and implementation\_backtrace](https://www.ruby-forum.com/t/strange-behaviour-with-pending-specs-and-implementation-backtrace/142474)

<div class="topic-metadata">

**Author:** [@awarberg](https://www.ruby-forum.com/u/awarberg)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/strange-behaviour-with-pending-specs-and-implementation-backtrace/142474 "2008-07-08T14:35:38Z")

</div>

Hi all, I’m using my own OutputFormatter with /bin/spec to catch rspec results. I’m experiencing strange behaviour with pending specs and implementation\_backtrace. This is my example\_pending implementation in rspacto…

---

## [Not sure why this controller spec isn't working](https://www.ruby-forum.com/t/not-sure-why-this-controller-spec-isnt-working/142434)

<div class="topic-metadata">

**Author:** [@Tiffani\_Ashley\_B](https://www.ruby-forum.com/u/Tiffani_Ashley_B)\
**Replies:** 6\
**Last updated:** [July 8, 2008, 6:21am UTC](https://www.ruby-forum.com/t/not-sure-why-this-controller-spec-isnt-working/142434 "2008-07-08T06:21:47Z")

</div>

Hey folks, I’ve been mocking and stubbing pretty nicely after the various bits of advice I received earlier about doing so. I’ve come to bits of code that work in one place and not in another, though. I’m hoping it…

---

## [Is BDD with RSpec cheaper?](https://www.ruby-forum.com/t/is-bdd-with-rspec-cheaper/142418)

<div class="topic-metadata">

**Author:** [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Replies:** 8\
**Last updated:** [July 8, 2008, 5:57am UTC](https://www.ruby-forum.com/t/is-bdd-with-rspec-cheaper/142418 "2008-07-08T05:57:13Z")

</div>

This might be a loaded question on this forum, but here goes: Just had a discussion with a prospective employer, a Ruby On Rails shop. His reaction to BDD development on every project was skeptical, saying something …

---

## [Trouble with Association Proxies and new/create in rails](https://www.ruby-forum.com/t/trouble-with-association-proxies-and-new-create-in-rails/142356)

<div class="topic-metadata">

**Author:** [@Sam\_GranieriS\_Jr](https://www.ruby-forum.com/u/Sam_GranieriS_Jr)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/trouble-with-association-proxies-and-new-create-in-rails/142356 "2008-07-07T22:23:18Z")

</div>

I’m working on some code that uses association proxies. I’m trying to get away from using fixtures, and move more to mocking and stubbing. So far, so good, but the methods I cant figure out, even with extensive googli…

---

## [Auto-generated descriptions](https://www.ruby-forum.com/t/auto-generated-descriptions/142236)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 11\
**Last updated:** [July 7, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/auto-generated-descriptions/142236 "2008-07-07T21:06:42Z")

</div>

Hey all, I’m looking for ways to optimize rspec and came upon something interesting. If I remove handling for auto-generated descriptions (the thing that allows you to say “specify { 5.should == 5 }” with no descript…

---

## [How To Express Change of Associated Data](https://www.ruby-forum.com/t/how-to-express-change-of-associated-data/142335)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 12:51am UTC](https://www.ruby-forum.com/t/how-to-express-change-of-associated-data/142335 "2008-07-07T00:51:02Z")

</div>

Hello– I’m not sure if I’m pushing too far out of specing a given model, but here’s what I want to express: class A \< AR::Base has\_many :bs def okay(segment) end end class B \< AR::Base belongs\_to :a end it A, …

---

## [Attempting to Make Sense of RSpec use](https://www.ruby-forum.com/t/attempting-to-make-sense-of-rspec-use/142165)

<div class="topic-metadata">

**Author:** [@Tiffani\_Ashley\_B](https://www.ruby-forum.com/u/Tiffani_Ashley_B)\
**Replies:** 6\
**Last updated:** [July 5, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/attempting-to-make-sense-of-rspec-use/142165 "2008-07-05T23:01:39Z")

</div>

Hi everybody, I’m pretty new to RSpec and have been reading over examples and tutorials of how to use the framework. I like everything so far since it goes right along with Rails’ expressiveness and such. I was rea…

---

## [Does RSpec work nicely with UUID primary keys?](https://www.ruby-forum.com/t/does-rspec-work-nicely-with-uuid-primary-keys/142269)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 5\
**Last updated:** [July 5, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/does-rspec-work-nicely-with-uuid-primary-keys/142269 "2008-07-05T22:11:56Z")

</div>

I have my application happily generating UUID primary keys using the uuidtools gem. But the auto-generated specifications created by “script/generate rspec\_scaffold…”, etc, assume that one is using a sequential intege…

---

## [Re-use scenarios from another story file?](https://www.ruby-forum.com/t/re-use-scenarios-from-another-story-file/142129)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 5\
**Last updated:** [July 5, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/re-use-scenarios-from-another-story-file/142129 "2008-07-05T14:43:29Z")

</div>

Hi All Is there a way to have “pre-requisite” story scenarios, and include them using GivenScenario in a different story file? i.e. I’d like to have a file “prereqs.story”, with “Scenario: A common setup”, and then i…

---

## [Fwd: Attempting to Make Sense of RSpec use](https://www.ruby-forum.com/t/fwd-attempting-to-make-sense-of-rspec-use/142219)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 0\
**Last updated:** [July 4, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/fwd-attempting-to-make-sense-of-rspec-use/142219 "2008-07-04T18:17:55Z")

</div>

On Fri, Jul 4, 2008 at 6:28 AM, David C. removed\_email\_address@domain.invalid wrote: On Jul 3, 2008, at 10:55 PM, Mark W. wrote: The problem I just found with shared specs is that if one fails, you don’t see the sh…

---

## [Open source projects using RSpec](https://www.ruby-forum.com/t/open-source-projects-using-rspec/142193)

<div class="topic-metadata">

**Author:** [@reivilo](https://www.ruby-forum.com/u/reivilo)\
**Replies:** 6\
**Last updated:** [July 4, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/open-source-projects-using-rspec/142193 "2008-07-04T17:24:36Z")

</div>

Hello, Anyone knows of open source projects that uses RSpec and RSpec Stories? I’d love to see how it is being used in different projects. Thank you Olivier D.

---

## [Global setup method goes where?](https://www.ruby-forum.com/t/global-setup-method-goes-where/142177)

<div class="topic-metadata">

**Author:** [@patched](https://www.ruby-forum.com/u/patched)\
**Replies:** 3\
**Last updated:** [July 4, 2008, 10:15am UTC](https://www.ruby-forum.com/t/global-setup-method-goes-where/142177 "2008-07-04T10:15:50Z")

</div>

You know how sometimes you look in /log/test.log for debug information like which test caused a certain render or query? I found this post which shows how to get test information printed out in your test.log with test…

---

## [Controller spec gives strange error](https://www.ruby-forum.com/t/controller-spec-gives-strange-error/142078)

<div class="topic-metadata">

**Author:** [@threeeyedfish](https://www.ruby-forum.com/u/threeeyedfish)\
**Replies:** 4\
**Last updated:** [July 4, 2008, 8:08am UTC](https://www.ruby-forum.com/t/controller-spec-gives-strange-error/142078 "2008-07-04T08:08:32Z")

</div>

Good day! I have a Rails app with a controller that sets an instance variable in a before\_filter, like this: class PostsController \< ApplicationController before\_filter :set\_site\_language def set\_site\_language @sit…

---

## [How to detect an attribute rename from a view spec?](https://www.ruby-forum.com/t/how-to-detect-an-attribute-rename-from-a-view-spec/142170)

<div class="topic-metadata">

**Author:** [@nbits](https://www.ruby-forum.com/u/nbits)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 3:15am UTC](https://www.ruby-forum.com/t/how-to-detect-an-attribute-rename-from-a-view-spec/142170 "2008-07-04T03:15:36Z")

</div>

I’m new to RSpec so excuse me if I’m missing something obvious here. I recently renamed an attribute on a model, and my generated view spec didn’t detect it. This resulted in a defect going through undetected. Even w…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/142109)

<div class="topic-metadata">

**Author:** [@jlebrech](https://www.ruby-forum.com/u/jlebrech)\
**Replies:** 1\
**Last updated:** [July 4, 2008, 3:12am UTC](https://www.ruby-forum.com/t/no-subject/142109 "2008-07-04T03:12:05Z")

</div>

Sent from my mobile

---

## [Re: matchers not working...? Solved (weird autotest error though)](https://www.ruby-forum.com/t/re-matchers-not-working-solved-weird-autotest-error-though/142158)

<div class="topic-metadata">

**Author:** [@apie](https://www.ruby-forum.com/u/apie)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/re-matchers-not-working-solved-weird-autotest-error-though/142158 "2008-07-03T22:49:48Z")

</div>

Hi David Thanks, the git repos work great. I am trying to get autotest to work but keep getting this error. loading autotest/rails\_rspec Autotest style autotest/rails\_rspec doesn’t seem to exist. Aborting. Have you …

---

## [Autotest failing on startup](https://www.ruby-forum.com/t/autotest-failing-on-startup/142081)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 3\
**Last updated:** [July 3, 2008, 8:41pm UTC](https://www.ruby-forum.com/t/autotest-failing-on-startup/142081 "2008-07-03T20:41:20Z")

</div>

I have been using autotest/zentest 3.5.0 with my rails 2.0.2 and rspec. I upgraded my gems and got 3.9.3 and had a problem. I went back to 3.5.0 and it worked. I stayed there until moving to rails 2.1. I again updat…

---

## [Testing HAML in helper rspec](https://www.ruby-forum.com/t/testing-haml-in-helper-rspec/142130)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/testing-haml-in-helper-rspec/142130 "2008-07-03T18:59:11Z")

</div>

Thought I’d post this under its own heading so others can find it. Thanks to David for the pointers to solve this. Here is the incantation needed to use HAML 2.0 under RSpec 1.1.5 (Needs the .5 for a fix) applicatio…

---

## [Unable to access flash from rails helper spec since upgrade to 1.1.4](https://www.ruby-forum.com/t/unable-to-access-flash-from-rails-helper-spec-since-upgrade-to-1-1-4/142060)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 4\
**Last updated:** [July 3, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/unable-to-access-flash-from-rails-helper-spec-since-upgrade-to-1-1-4/142060 "2008-07-03T18:03:28Z")

</div>

Hi, Many moons ago I wrote this blog entry… http://blog.wolfman.com/articles/2007/07/14/using-rspec-to-test-haml-helpers I just upgraded that rails project to use rspec 1.1.4 and associated rspec\_rails. It seems tha…

---

## [Odd Date-based spec failing](https://www.ruby-forum.com/t/odd-date-based-spec-failing/141858)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 11\
**Last updated:** [July 3, 2008, 5:31pm UTC](https://www.ruby-forum.com/t/odd-date-based-spec-failing/141858 "2008-07-03T17:31:47Z")

</div>

Hrm. I have a spec for a model ‘Phase’. a Phase has a start and end date, and a method ‘percentage\_complete’ that calculates the percentage of time that has already elapsed between said start and end dates. This spec…

---

## [Error on Autotest start](https://www.ruby-forum.com/t/error-on-autotest-start/142083)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 10:16am UTC](https://www.ruby-forum.com/t/error-on-autotest-start/142083 "2008-07-03T10:16:18Z")

</div>

I have been using autotest/zentest 3.5.0 with my rails 2.0.2 and rspec. I upgraded my gems and got 3.9.3 and had a problem. I went back to 3.5.0 and it worked. I stayed there until moving to rails 2.1. I again updat…

---

## [Stopping example execution?](https://www.ruby-forum.com/t/stopping-example-execution/141672)

<div class="topic-metadata">

**Author:** [@Britt\_Mileshosky](https://www.ruby-forum.com/u/Britt_Mileshosky)\
**Replies:** 13\
**Last updated:** [July 3, 2008, 7:57am UTC](https://www.ruby-forum.com/t/stopping-example-execution/141672 "2008-07-03T07:57:58Z")

</div>

Hello, I’m wondering If I am missing something here when creating an example that sets an expecation at the top or beginning of an action but requires you to stub / mock everything that follows. Example: I want to te…

---

## [Re: Stopping Example Execution?](https://www.ruby-forum.com/t/re-stopping-example-execution/141841)

<div class="topic-metadata">

**Author:** [@Britt\_Mileshosky](https://www.ruby-forum.com/u/Britt_Mileshosky)\
**Replies:** 5\
**Last updated:** [July 3, 2008, 6:05am UTC](https://www.ruby-forum.com/t/re-stopping-example-execution/141841 "2008-07-03T06:05:04Z")

</div>

n Sun, Jun 29, 2008 at 12:20 PM, David C. wrote: On Jun 29, 2008, at 11:18 AM, Britt Mileshosky wrote: However, do you see where something like a return statement or end example statement could be beneficial? If you …

---

## [View spec issue](https://www.ruby-forum.com/t/view-spec-issue/142052)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 11:54pm UTC](https://www.ruby-forum.com/t/view-spec-issue/142052 "2008-07-02T23:54:01Z")

</div>

I’ve been having some view spec issues, and I think I finally traced it to ground - it seems like setting a value in assigns like: assigns\[:foo\] = “baz” doesn’t get used to build the path prefix for a route like: map…

---

## [\[ANN\] Lone Star Ruby Conference 2008 - Registration Now Open](https://www.ruby-forum.com/t/ann-lone-star-ruby-conference-2008-registration-now-open/142047)

<div class="topic-metadata">

**Author:** [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/ann-lone-star-ruby-conference-2008-registration-now-open/142047 "2008-07-02T21:53:56Z")

</div>

(Pardon the interruption) Greetings The Lone Star Ruby Conference, held in Austin, TX on September 4-6, is NOW OPEN for registration. This year we have an amazing line-up of speakers, in addition to Matz, the author …

---

## [Cookies - how to set in controller specs?](https://www.ruby-forum.com/t/cookies-how-to-set-in-controller-specs/141960)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 12\
**Last updated:** [July 2, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/cookies-how-to-set-in-controller-specs/141960 "2008-07-02T20:46:55Z")

</div>

I’ve been searching Google, the mailing list, etc, etc. and can’t for the life of me get a cookie to be set in a controller spec. From everything I’ve read on the web, it appears all I need to do is the typical: coo…

---

## [Matchers not working...?](https://www.ruby-forum.com/t/matchers-not-working/141939)

<div class="topic-metadata">

**Author:** [@apie](https://www.ruby-forum.com/u/apie)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 2:34pm UTC](https://www.ruby-forum.com/t/matchers-not-working/141939 "2008-07-02T14:34:10Z")

</div>

Hi. I am pretty new to rspec so forgive my ignorance. I am getting errors that seem to be the matchers not working - example: vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:478:in …

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

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