# RSpec

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

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

---

## [Simple == with prettier error messages + good documentation](https://www.ruby-forum.com/t/simple-with-prettier-error-messages-good-documentation/158955)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 19\
**Last updated:** [February 2, 2009, 9:47am UTC](https://www.ruby-forum.com/t/simple-with-prettier-error-messages-good-documentation/158955 "2009-02-02T09:47:07Z")

</div>

Hi all, I’ve found myself writing a thing I think is less than optimal, looking for suggestions. The context is, I’m testing a result, and as a part of that test, I might verify two or three things, which are individ…

---

## [Re: resource urls only work \*after\* a get() in controller spec](https://www.ruby-forum.com/t/re-resource-urls-only-work-after-a-get-in-controller-spec/159193)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 2, 2009, 9:12am UTC](https://www.ruby-forum.com/t/re-resource-urls-only-work-after-a-get-in-controller-spec/159193 "2009-02-02T09:12:00Z")

</div>

Okay, following up on this item. Would you believe a workaround of (gasp) get :index, prior to expecting route-based URLs to work? (slaps forehead). or do\_action(), provided by the host example group (the more conc…

---

## [Resource urls only work \*after\* a get() in controller spec](https://www.ruby-forum.com/t/resource-urls-only-work-after-a-get-in-controller-spec/159131)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [February 1, 2009, 9:19am UTC](https://www.ruby-forum.com/t/resource-urls-only-work-after-a-get-in-controller-spec/159131 "2009-02-01T09:19:02Z")

</div>

I’m encountering an interesting symptom during example execution. I’m making a shared example group that dries up belongs-to-me before\_filter testing, and it makes a callback to the example group that says it\_should\_…

---

## [RSpec get model attribute values by name](https://www.ruby-forum.com/t/rspec-get-model-attribute-values-by-name/159055)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 6\
**Last updated:** [January 31, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/rspec-get-model-attribute-values-by-name/159055 "2009-01-31T18:25:16Z")

</div>

This is a request for a programming technique: Given class Mymodel \< ActiveRecord::Base end my\_instance = Mymodel.new If I am given a string representation of an attribute “xxx” what is the most elegant way of pass…

---

## [OK... What is ... fu?](https://www.ruby-forum.com/t/ok-what-is-fu/159027)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 15\
**Last updated:** [January 31, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/ok-what-is-fu/159027 "2009-01-31T17:11:19Z")

</div>

Pardon my ignorance, but exactly what does \_fu mean WRT Ruby plugins, gems and such? I have run across this suffix a number of times in Ruby and Rails, always in connection with some add-on or extension. In the origi…

---

## [Strange message expectation behaviour with Time.now in a find condition](https://www.ruby-forum.com/t/strange-message-expectation-behaviour-with-time-now-in-a-find-condition/158958)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 9\
**Last updated:** [January 30, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/strange-message-expectation-behaviour-with-time-now-in-a-find-condition/158958 "2009-01-30T19:30:14Z")

</div>

Even if this is a bug, it’s a pretty obscure one. It was frustrating the hell out of me until I found a workaround, so I thought I’d just post the details: Given a find like this: def self.find\_old User.all(:condit…

---

## [Cucumber resource routes](https://www.ruby-forum.com/t/cucumber-resource-routes/159025)

<div class="topic-metadata">

**Author:** [@churp](https://www.ruby-forum.com/u/churp)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/cucumber-resource-routes/159025 "2009-01-30T18:17:58Z")

</div>

Hi all, I’m missing something basic here. Inside ./features/support/paths.rb I want to use a ActionController::Resources helper for Products as mapped in routes.rb ./routes.rb map.resource :product ./features/suppo…

---

## [Session vs. controller.session](https://www.ruby-forum.com/t/session-vs-controller-session/158959)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 10:58pm UTC](https://www.ruby-forum.com/t/session-vs-controller-session/158959 "2009-01-29T22:58:30Z")

</div>

What exactly is the difference between using controller.session and session? I though that session was just a proxy controller.session, but this irb/debug sessions show that it isn’t: When I call reset\_session in t…

---

## [Rspec beta book documenting errors](https://www.ruby-forum.com/t/rspec-beta-book-documenting-errors/158963)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 9:21pm UTC](https://www.ruby-forum.com/t/rspec-beta-book-documenting-errors/158963 "2009-01-29T21:21:08Z")

</div>

Hi, Where should we be documenting errors in the Rspec beta book? Thanks Aidy

---

## [\[Cucumber\] two running formats](https://www.ruby-forum.com/t/cucumber-two-running-formats/158962)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/cucumber-two-running-formats/158962 "2009-01-29T21:03:50Z")

</div>

Hi, Is it possible to run the html and console formatting concurrently in Cucumber? Thanks Aidy

---

## [\[ANN\] At last, the book](https://www.ruby-forum.com/t/ann-at-last-the-book/158936)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 3\
**Last updated:** [January 29, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/ann-at-last-the-book/158936 "2009-01-29T17:26:14Z")

</div>

I have just gone to “Pragmatic Programmers” and spent my money in the book I have dreaming for six months. :slight\_smile: Maybe I’m the first :slight\_smile:

---

## [\[Cucumber\] cucumber command does not work in db transaction](https://www.ruby-forum.com/t/cucumber-cucumber-command-does-not-work-in-db-transaction/158920)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 6\
**Last updated:** [January 29, 2009, 4:28pm UTC](https://www.ruby-forum.com/t/cucumber-cucumber-command-does-not-work-in-db-transaction/158920 "2009-01-29T16:28:08Z")

</div>

I am working in an scenario and it’s still failing. I have not yet finished it. And I am running it constantly with the cucumber command, not with rake. The problem is that it’s not working with the database in a tran…

---

## [\[Cucumber\] Tabular data in steps](https://www.ruby-forum.com/t/cucumber-tabular-data-in-steps/158905)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 4\
**Last updated:** [January 29, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/cucumber-tabular-data-in-steps/158905 "2009-01-29T12:42:38Z")

</div>

Is it possible to mix a normal parameter argument for a step, with tabular data? Something like this: Given there is a country “Spain” with the cities: |name | |Madrid | |Barcelona | |Valencia | And this…

---

## [\[Cucumber, TextMate Bundle\] Call for help](https://www.ruby-forum.com/t/cucumber-textmate-bundle-call-for-help/158844)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 10:28pm UTC](https://www.ruby-forum.com/t/cucumber-textmate-bundle-call-for-help/158844 "2009-01-28T22:28:40Z")

</div>

Hey all, As some of you may know I created the Cucumber TextMate bundle: What most of you probably don’t know is that I stopped using TextMate (in favor of Vim) several months ago. Since then the Cucumber bundle ha…

---

## [Specs run faster separately than together](https://www.ruby-forum.com/t/specs-run-faster-separately-than-together/158860)

<div class="topic-metadata">

**Author:** [@Jeremy\_Lightsmith](https://www.ruby-forum.com/u/Jeremy_Lightsmith)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/specs-run-faster-separately-than-together/158860 "2009-01-28T22:14:34Z")

</div>

So this is weird. on my current project I’ve been working on speeding up specs, and I just found that time rake spec =\> 4m 0s whereas time rake spec:controllers spec:models spec:helpers spec:lib =\> 2m 32s (we don’t…

---

## [\[RSpec\] Error when returning multiple values from a stub](https://www.ruby-forum.com/t/rspec-error-when-returning-multiple-values-from-a-stub/158750)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/rspec-error-when-returning-multiple-values-from-a-stub/158750 "2009-01-28T19:32:02Z")

</div>

Hey guys. I’ve just found some odd behaviour within RSpec 1.1.12 , and would like to know whether this is a bug, or I’m doing something wrong. When I give multiple return values to a stub, like this: SubtitleFile.stub…

---

## [\[RSpec\] Cloning objects and leaking state](https://www.ruby-forum.com/t/rspec-cloning-objects-and-leaking-state/158775)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 8\
**Last updated:** [January 28, 2009, 6:34pm UTC](https://www.ruby-forum.com/t/rspec-cloning-objects-and-leaking-state/158775 "2009-01-28T18:34:27Z")

</div>

G’day folks. I’ve been beating my head on this one problem for a couple of hours, and have managed to figure out what’s causing it. However, I don’t understand why it’s happening, nor do I know how to solve or get aro…

---

## [Testing Sub-domains with Cucumber](https://www.ruby-forum.com/t/testing-sub-domains-with-cucumber/157648)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 8\
**Last updated:** [January 28, 2009, 5:00pm UTC](https://www.ruby-forum.com/t/testing-sub-domains-with-cucumber/157648 "2009-01-28T17:00:58Z")

</div>

My site uses sub-domains to create a context for the user. In my tests, I need to stipulate what domain is being used, to test whether the context is correct for the given user. But I cannot find if and where i can ch…

---

## [(Cucumber) Non-default folder hierarchy in Cucumber Textmate bundle](https://www.ruby-forum.com/t/cucumber-non-default-folder-hierarchy-in-cucumber-textmate-bundle/158756)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 3\
**Last updated:** [January 28, 2009, 11:45am UTC](https://www.ruby-forum.com/t/cucumber-non-default-folder-hierarchy-in-cucumber-textmate-bundle/158756 "2009-01-28T11:45:41Z")

</div>

Hi Guys, I refactored my folder hierarchy organizing my cucumber features in sub-folders of features such as model, control, listeners, etc. When I run from the command line now I use the -r features prior to specify…

---

## [\[ANN, Cucumber\] Textile Formatter](https://www.ruby-forum.com/t/ann-cucumber-textile-formatter/158767)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 3\
**Last updated:** [January 28, 2009, 2:33am UTC](https://www.ruby-forum.com/t/ann-cucumber-textile-formatter/158767 "2009-01-28T02:33:43Z")

</div>

Sheepishly, I am announcing that I created a textile formatter for Cuke. It was unabashedly ripped out of the HTML formatter, so there is almost certainly a better way to do it. The incentive behind this was my desire…

---

## [Testing capistrano tasks](https://www.ruby-forum.com/t/testing-capistrano-tasks/158708)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 7\
**Last updated:** [January 27, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/testing-capistrano-tasks/158708 "2009-01-27T21:34:35Z")

</div>

Does anyone have any insight into testing capistrano tasks? More specifically, I’m looking to add regression tests to this package, which adds database backup tasks to capistrano: Scott

---

## [Rake features does not seem to run rake db:test:prepare](https://www.ruby-forum.com/t/rake-features-does-not-seem-to-run-rake-dbprepare/158754)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 2\
**Last updated:** [January 27, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/rake-features-does-not-seem-to-run-rake-dbprepare/158754 "2009-01-27T18:46:18Z")

</div>

This may be misunderstanding on my part but I thought that running rake features would automatically run rake db:test:prepare. However, this does not seem to be the case. Am I mistaken or is this a bug? The rake tas…

---

## [Fixture\_scenarios problem](https://www.ruby-forum.com/t/fixture-scenarios-problem/158265)

<div class="topic-metadata">

**Author:** [@giuseb](https://www.ruby-forum.com/u/giuseb)\
**Replies:** 4\
**Last updated:** [January 27, 2009, 12:00am UTC](https://www.ruby-forum.com/t/fixture-scenarios-problem/158265 "2009-01-27T00:00:12Z")

</div>

Hello there, is anyone still using fixture\_scenarios with RSpec these days? They don’t seem to coexist peacefully anymore. I just created a new rails (2.2.2) app, generated an rspec\_scaffold (with v. 1.1.12), and ver…

---

## [Best way to spec nested modules?](https://www.ruby-forum.com/t/best-way-to-spec-nested-modules/158630)

<div class="topic-metadata">

**Author:** [@Stuart\_Hungerford](https://www.ruby-forum.com/u/Stuart_Hungerford)\
**Replies:** 2\
**Last updated:** [January 26, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/best-way-to-spec-nested-modules/158630 "2009-01-26T19:16:35Z")

</div>

Hi, I’ve got a set of classes in nested Ruby modules which I’m using rspec to specify: module Foo module Baz class C1 ... end class C2 ... end end end To specify C2 behaviour I need to create a bunch of…

---

## [Mocking/Stubbing ActiveRecord.config.default\_timezone](https://www.ruby-forum.com/t/mocking-stubbing-activerecord-config-default-timezone/158664)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [January 26, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/mocking-stubbing-activerecord-config-default-timezone/158664 "2009-01-26T19:00:03Z")

</div>

In tracking down a bug in AuthLogic I realized that I had made the same error in one of my libraries. Knowing what the error was made creating a test to expose it (using cucumber) rather trivial. However, it has occ…

---

## [\[ANN\] Cucumber 0.2 alpha](https://www.ruby-forum.com/t/ann-cucumber-0-2-alpha/158592)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 2\
**Last updated:** [January 26, 2009, 12:37pm UTC](https://www.ruby-forum.com/t/ann-cucumber-0-2-alpha/158592 "2009-01-26T12:37:44Z")

</div>

Hi folks, I’m pretty excited about the next release - 0.2. Please try out the prereleases (0.1.99): gem sources -a http://gems.github.com gem install aslakhellesoy-cucumber We need updated translations! To see what …

---

## [\[Cucumber\] Long backtrace](https://www.ruby-forum.com/t/cucumber-long-backtrace/158576)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 2\
**Last updated:** [January 25, 2009, 4:57am UTC](https://www.ruby-forum.com/t/cucumber-long-backtrace/158576 "2009-01-25T04:57:56Z")

</div>

I’m getting a humongous backtrace when I have an error in a Cucumber feature. Is there a way to quiet it down a bit? ///ark

---

## [\[Cucumber, BDD\] When not to use Cucumber?](https://www.ruby-forum.com/t/cucumber-bdd-when-not-to-use-cucumber/158472)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 10\
**Last updated:** [January 24, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/cucumber-bdd-when-not-to-use-cucumber/158472 "2009-01-24T19:06:13Z")

</div>

Hi all, Just wanted to get some feedback and opinions on something… I have been using Cucumber/Story Runner since plaintext support was introduced. (So, since October/November of 2007.) Throughout this time I have u…

---

## [Cucumber ENV setting in env.rb](https://www.ruby-forum.com/t/cucumber-env-setting-in-env-rb/158371)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 16\
**Last updated:** [January 23, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/cucumber-env-setting-in-env-rb/158371 "2009-01-23T19:31:31Z")

</div>

I develop in a heterogeneous environment. When I am working with Ruby on Rails on my laptop then I am inside the bash shell of cygwin running under MS-WinXPpro. I also happen to favour a light green on dark green def…

---

## [Reorganize documentation for Cucumber at Github](https://www.ruby-forum.com/t/reorganize-documentation-for-cucumber-at-github/158005)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 14\
**Last updated:** [January 23, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/reorganize-documentation-for-cucumber-at-github/158005 "2009-01-23T12:26:56Z")

</div>

Hi, I actually just noticed that Cucumber has plenty good documentation on its wiki at github. But the problems are: The homepage is badly designed as it doesn’t really outline an order to read other pages It is imp…

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

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