# RSpec

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

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

---

## [StepGroup?](https://www.ruby-forum.com/t/stepgroup/123933)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 4\
**Last updated:** [December 23, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/stepgroup/123933 "2007-12-23T20:02:17Z")

</div>

Hi, I have a need for the StepGroup feature in stories but not clear what’s the current api. Could you provide an example? In my case I have several scenarios which vary in the Givens, but not the results. Ideally I’…

---

## [Multiple scenarios problem](https://www.ruby-forum.com/t/multiple-scenarios-problem/124012)

<div class="topic-metadata">

**Author:** [@Ivo\_D](https://www.ruby-forum.com/u/Ivo_D)\
**Replies:** 1\
**Last updated:** [December 23, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/multiple-scenarios-problem/124012 "2007-12-23T19:59:56Z")

</div>

Hi all I just recently started to use rspec and I’m having a problem using multple scenarios in one story. These are the two scenarios, trying to test my implemenation of the new http authentication in rails 2: Scena…

---

## [Rails: possible routing discrepancy](https://www.ruby-forum.com/t/rails-possible-routing-discrepancy/124023)

<div class="topic-metadata">

**Author:** [@Francis\_H](https://www.ruby-forum.com/u/Francis_H)\
**Replies:** 1\
**Last updated:** [December 23, 2007, 7:36pm UTC](https://www.ruby-forum.com/t/rails-possible-routing-discrepancy/124023 "2007-12-23T19:36:27Z")

</div>

Hey all, I’m seeing a strange behavior in my spec that I can’t account for. I’ve got a route that looks like this: map.writing ‘/writing’, :controller =\> ‘abstracts’, :action =\> ‘index’, :index =\> { :select =\> ‘all…

---

## [Basic authentication](https://www.ruby-forum.com/t/basic-authentication/124009)

<div class="topic-metadata">

**Author:** [@Ivo\_D](https://www.ruby-forum.com/u/Ivo_D)\
**Replies:** 0\
**Last updated:** [December 23, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/basic-authentication/124009 "2007-12-23T13:50:08Z")

</div>

When I try to get a page via post\_via\_redirect on a project that uses the new rails 2 http authentication, for example: post\_via\_redirect path, {:name\_of\_object =\> { :att =\> “test” }}, :authorization =\> authorize th…

---

## [Rspec story directory structure](https://www.ruby-forum.com/t/rspec-story-directory-structure/123991)

<div class="topic-metadata">

**Author:** [@bryan](https://www.ruby-forum.com/u/bryan)\
**Replies:** 0\
**Last updated:** [December 23, 2007, 5:42am UTC](https://www.ruby-forum.com/t/rspec-story-directory-structure/123991 "2007-12-23T05:42:26Z")

</div>

I’ve been thinking about the structure of the rspec story stuff, and I’ve come up with this for my first post: stories/ # top level to contain all of our story related stuff stories/helper.rb # top level helper stori…

---

## [StoryRunner docs/guidance](https://www.ruby-forum.com/t/storyrunner-docs-guidance/123898)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 4\
**Last updated:** [December 23, 2007, 1:26am UTC](https://www.ruby-forum.com/t/storyrunner-docs-guidance/123898 "2007-12-23T01:26:24Z")

</div>

Hi all, Are there any plans for better documentation for the new StoryRunner feature? I tried to use it today (with Rails), and had a hard time getting my head around whether I was doing it “right” and exactly what t…

---

## [Rails: Specing libraries](https://www.ruby-forum.com/t/rails-specing-libraries/123963)

<div class="topic-metadata">

**Author:** [@Caleb\_L](https://www.ruby-forum.com/u/Caleb_L)\
**Replies:** 1\
**Last updated:** [December 22, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/rails-specing-libraries/123963 "2007-12-22T20:20:53Z")

</div>

I was reading the documentation on using rails with rspec and I didn’t see anything about how to spec libraries in the rails /lib directory so that they’re integrated into the whole spec::rails system. Where should I…

---

## [I need some guidance](https://www.ruby-forum.com/t/i-need-some-guidance/123891)

<div class="topic-metadata">

**Author:** [@jimmy\_zimmerman](https://www.ruby-forum.com/u/jimmy_zimmerman)\
**Replies:** 4\
**Last updated:** [December 21, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/i-need-some-guidance/123891 "2007-12-21T20:44:45Z")

</div>

I’m building an http communicator class for a web service API wrapper and I’m trying to go through the BDD process in doing so. I’m having a bit of a struggle figuring out how to set up the tests in relation to isola…

---

## [Link to lighthouse?](https://www.ruby-forum.com/t/link-to-lighthouse/123739)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 1\
**Last updated:** [December 20, 2007, 7:49am UTC](https://www.ruby-forum.com/t/link-to-lighthouse/123739 "2007-12-20T07:49:51Z")

</div>

fyi, there doesnt seem to be a link to rspec.lighthouse.com from the new web site (unless I missed it). I guess I expected it under “Community” linoj

---

## [Installation Trouble](https://www.ruby-forum.com/t/installation-trouble/123653)

<div class="topic-metadata">

**Author:** [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Replies:** 5\
**Last updated:** [December 20, 2007, 4:30am UTC](https://www.ruby-forum.com/t/installation-trouble/123653 "2007-12-20T04:30:33Z")

</div>

Hey all, I’m new to BDD and rspec, but I am very intrigued. I tried installing rspec and rspec\_on\_rails into my Rails app, but I am having some trouble. I chose to install both as plugins, as the documentation sugges…

---

## [New home for the rspec website](https://www.ruby-forum.com/t/new-home-for-the-rspec-website/123166)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 9\
**Last updated:** [December 19, 2007, 8:37pm UTC](https://www.ruby-forum.com/t/new-home-for-the-rspec-website/123166 "2007-12-19T20:37:53Z")

</div>

Hi all, We’ve moved the rspec website to http://rspec.info. We want http://rspec.org, of course, but someone is squatting on and has yet to respond to my email :frowning: The 1.1.0 docs are there. The 1.0.8 docs are …

---

## [Using autotest + rspec for plain ruby (not rails)](https://www.ruby-forum.com/t/using-autotest-rspec-for-plain-ruby-not-rails/123662)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 3\
**Last updated:** [December 19, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/using-autotest-rspec-for-plain-ruby-not-rails/123662 "2007-12-19T18:00:42Z")

</div>

autotest (zentest 3.5.0) + rspec 1.1.1 ask for “spec\_autotest.rb”, nowhere to be found…

---

## [Change in isolation behaviour 1.08 - 1.10?](https://www.ruby-forum.com/t/change-in-isolation-behaviour-1-08-1-10/123414)

<div class="topic-metadata">

**Author:** [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Replies:** 14\
**Last updated:** [December 19, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/change-in-isolation-behaviour-1-08-1-10/123414 "2007-12-19T16:15:39Z")

</div>

Hi, I just moved from 1.08 to 1.10 and now have one example failing, which, under 1.08, passed. Is the due to a change in behaviour? Here’s my spec (removed some passing examples) require File.dirname(FILE) + ‘/…/spe…

---

## [Shared behav](https://www.ruby-forum.com/t/shared-behav/123580)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 16\
**Last updated:** [December 18, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/shared-behav/123580 "2007-12-18T23:48:55Z")

</div>

hi, i want to make a behavior shared between models, the examples need to create new instances etc. Is there a way to pass the model class to the shared behavior?

---

## [Vim integration](https://www.ruby-forum.com/t/vim-integration/196546)

<div class="topic-metadata">

**Author:** [@eterps](https://www.ruby-forum.com/u/eterps)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/vim-integration/196546 "2007-12-18T22:32:50Z")

</div>

Hi, Does anybody have a vim script that enables me to run specs from within vim and have the cursor positioned on the right line in case of a backtrace? TIA, Erik.

---

## [RSpec 1.1.0 (Rails) --- Supported Rails Versions?](https://www.ruby-forum.com/t/rspec-1-1-0-rails-supported-rails-versions/123453)

<div class="topic-metadata">

**Author:** [@codejoy](https://www.ruby-forum.com/u/codejoy)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/rspec-1-1-0-rails-supported-rails-versions/123453 "2007-12-17T22:18:38Z")

</div>

Hi Just a quick question … what backward versions of Rails will the 1.1.0 versions of RSpec and Spec::Rails support? I think I maybe under the (incorrect) impression that I had to go to Rails 2.0 for 1.1.0 Cheers S…

---

## [Need help mocking this out](https://www.ruby-forum.com/t/need-help-mocking-this-out/196532)

<div class="topic-metadata">

**Author:** [@FischerS\_Daniel](https://www.ruby-forum.com/u/FischerS_Daniel)\
**Replies:** 17\
**Last updated:** [December 16, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/need-help-mocking-this-out/196532 "2007-12-16T23:06:30Z")

</div>

Let’s say you’re using the restful\_authentication plugin. You have a model called articles. On the index action of the articlescontroller you simply want to spec out that it’ll scope the results to the ownership of t…

---

## [How do I mock params?](https://www.ruby-forum.com/t/how-do-i-mock-params/123124)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 5\
**Last updated:** [December 16, 2007, 10:44pm UTC](https://www.ruby-forum.com/t/how-do-i-mock-params/123124 "2007-12-16T22:44:47Z")

</div>

Here is the code within the controller: Line 69: @photo = @member.build\_photo(params\[:photo\]) unless params\[:photo\]\[:uploaded\_data\].blank? I got a little ahead of myself and wrote the code, and now have a bunch of …

---

## [How do I spec my Rails routes?](https://www.ruby-forum.com/t/how-do-i-spec-my-rails-routes/123329)

<div class="topic-metadata">

**Author:** [@Francis\_H](https://www.ruby-forum.com/u/Francis_H)\
**Replies:** 3\
**Last updated:** [December 16, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/how-do-i-spec-my-rails-routes/123329 "2007-12-16T22:30:08Z")

</div>

Once again, here’s something I haven’t figured out. Apologies if this is too newb-ish, but, how do I spec my routes using RSpec-Rails? In particular, I’ve got a catch-all route that needs to catch a wide variety of UR…

---

## [Vim integration](https://www.ruby-forum.com/t/vim-integration/123156)

<div class="topic-metadata">

**Author:** [@eterps](https://www.ruby-forum.com/u/eterps)\
**Replies:** 1\
**Last updated:** [December 16, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/vim-integration/123156 "2007-12-16T21:51:21Z")

</div>

Hi, Does anybody have a vim script that enables me to run specs from within vim and have the cursor positioned on the right line in case of a backtrace? TIA, Erik.

---

## [rSpec troubles](https://www.ruby-forum.com/t/rspec-troubles/123328)

<div class="topic-metadata">

**Author:** [@randall](https://www.ruby-forum.com/u/randall)\
**Replies:** 3\
**Last updated:** [December 16, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/rspec-troubles/123328 "2007-12-16T17:47:55Z")

</div>

Hello All, I am hoping someone can help me. I am having a nightmare of a time trying to get rSpec to work. It was working at one time, but I tried installing Zentest to get autotest to work with rSpec and it’s been …

---

## [RSpec poll](https://www.ruby-forum.com/t/rspec-poll/123187)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [December 14, 2007, 7:15pm UTC](https://www.ruby-forum.com/t/rspec-poll/123187 "2007-12-14T19:15:10Z")

</div>

If anyone’s interested in voting, I’m in the last couple of days of a poll about RSpec. If you’d like to toss in your vote (or a comment), I’d appreciate it: – thanks, -pate

---

## [Problem running examples with spec\_server](https://www.ruby-forum.com/t/problem-running-examples-with-spec-server/122843)

<div class="topic-metadata">

**Author:** [@David\_Nolan](https://www.ruby-forum.com/u/David_Nolan)\
**Replies:** 3\
**Last updated:** [December 14, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/problem-running-examples-with-spec-server/122843 "2007-12-14T13:52:15Z")

</div>

Hello, Running RSpec without DRB works fine. However, “spec -X” runs without error but provides no output at all, even though the DRB spec\_server seems to be fine. Has anyone got some suggestions as to why and how t…

---

## [Can't access helper methods for model testing](https://www.ruby-forum.com/t/cant-access-helper-methods-for-model-testing/122747)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 3\
**Last updated:** [December 14, 2007, 7:43am UTC](https://www.ruby-forum.com/t/cant-access-helper-methods-for-model-testing/122747 "2007-12-14T07:43:46Z")

</div>

I would like to have some valid mock models readily available in the helper module, but when I try to access the helper I get the error saying that the method is not found. describe MembersHelper do # Helper methods ca…

---

## [RSpec and Mock Tutorial/Cheatsheet](https://www.ruby-forum.com/t/rspec-and-mock-tutorial-cheatsheet/123058)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 7:31pm UTC](https://www.ruby-forum.com/t/rspec-and-mock-tutorial-cheatsheet/123058 "2007-12-13T19:31:21Z")

</div>

I wrote a simple summary of Mocks with RSpec as an answer to a discussion on our local Ruby users group. I was wondering if people here could review it, adding comments for any corrections or other important ideas re…

---

## [Stub with assigns?](https://www.ruby-forum.com/t/stub-with-assigns/122987)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 8\
**Last updated:** [December 13, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/stub-with-assigns/122987 "2007-12-13T18:20:22Z")

</div>

is there a way to stub a method that sets an instance variable, so the stub sets it too? def find\_foo @foo = Foo.find(params\[:id\] end … controller.stub!(:find\_foo).and\_assigns(:foo, “123”)

---

## ["Tricks" for testing after\_create callback?](https://www.ruby-forum.com/t/tricks-for-testing-after-create-callback/122971)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 16\
**Last updated:** [December 13, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/tricks-for-testing-after-create-callback/122971 "2007-12-13T17:39:48Z")

</div>

I’ve got a model Message, which needs to send an email using action mailer after it’s first saved in the database. I want to pass the model to the mailer which then uses methods on the message model to render the emai…

---

## [Rspec 1.0.8 with Rails 2.0](https://www.ruby-forum.com/t/rspec-1-0-8-with-rails-2-0/122799)

<div class="topic-metadata">

**Author:** [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Replies:** 6\
**Last updated:** [December 13, 2007, 9:12am UTC](https://www.ruby-forum.com/t/rspec-1-0-8-with-rails-2-0/122799 "2007-12-13T09:12:28Z")

</div>

Is it OK to go ahead and generate a Rails 2.0 project with RSpec 1.0.8? Am I likely to run into problems? Would it be best advised to wait or can I go ahead now? Thanks, Yitzhak

---

## [Namespaced controllers](https://www.ruby-forum.com/t/namespaced-controllers/121111)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 12\
**Last updated:** [December 13, 2007, 2:47am UTC](https://www.ruby-forum.com/t/namespaced-controllers/121111 "2007-12-13T02:47:12Z")

</div>

Out of curiosity, I’ve seen the following fail: module Admin describe MyController … end end But this works fine: describe Admin::MyController … end Why? Scott

---

## [Transactional/Rollback problems](https://www.ruby-forum.com/t/transactional-rollback-problems/122862)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 3\
**Last updated:** [December 12, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/transactional-rollback-problems/122862 "2007-12-12T23:13:55Z")

</div>

I’m having a rollback problem with rspec trunk. It doesn’t seem like rollbacks are happening quite as often as they should be. It appears as though the rollbacks are NOT occurring on the first description block in …

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

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