# RSpec

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

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

---

## [Jumping authentication spec](https://www.ruby-forum.com/t/jumping-authentication-spec/141922)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 1, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/jumping-authentication-spec/141922 "2008-07-01T20:19:07Z")

</div>

hi everyone! i ve been working in my new rspec scaffold generator. I have made all the neccesary specs over all controllers and models. I am working with restful\_authenticated plugin. I have already coded the spects …

---

## [HTTPERF + RSPEC + BONG = euphoric development](https://www.ruby-forum.com/t/httperf-rspec-bong-euphoric-development/141850)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [July 1, 2008, 12:56am UTC](https://www.ruby-forum.com/t/httperf-rspec-bong-euphoric-development/141850 "2008-07-01T00:56:03Z")

</div>

My coworker and I just discovered http://github.com/topfunky/bong/tree/master/lib/bong.rb It’s a kool script written by topfunky himself that wraps httperf in ruby. It formats the input URLs and the results and yaml…

---

## [Fixtures in a story](https://www.ruby-forum.com/t/fixtures-in-a-story/141676)

<div class="topic-metadata">

**Author:** [@Jony\_dos\_Santos\_Kos](https://www.ruby-forum.com/u/Jony_dos_Santos_Kos)\
**Replies:** 0\
**Last updated:** [June 29, 2008, 3:45am UTC](https://www.ruby-forum.com/t/fixtures-in-a-story/141676 "2008-06-29T03:45:34Z")

</div>

Hi there, I have some legacy fixtures of test/unit that come in handy and I’d like to use them in my stories. I’m wondering what is the best way to do it. Any suggestion? Jony

---

## [Dealing with dependent data](https://www.ruby-forum.com/t/dealing-with-dependent-data/141431)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 16\
**Last updated:** [June 28, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/dealing-with-dependent-data/141431 "2008-06-28T16:35:52Z")

</div>

If there’s already been a thread on this, let me know (and if you can, point me to it)… In building my stories, I often need to setup a bunch of data where you have multiple levels of models that depend on each other.…

---

## [TextMate language bindings/modes](https://www.ruby-forum.com/t/textmate-language-bindings-modes/141616)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 2\
**Last updated:** [June 28, 2008, 6:27am UTC](https://www.ruby-forum.com/t/textmate-language-bindings-modes/141616 "2008-06-28T06:27:53Z")

</div>

I’m wondering if anyone has TextMate working really smoothly where it properly sets the language binding for the given type of file, in relation to Rails, RSpec, RSpec Plain Text Story, RSpec Story Runner, and RSpec S…

---

## [How do I mock the Rails Logger with should\_receive?](https://www.ruby-forum.com/t/how-do-i-mock-the-rails-logger-with-should-receive/140333)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [June 25, 2008, 8:57am UTC](https://www.ruby-forum.com/t/how-do-i-mock-the-rails-logger-with-should-receive/140333 "2008-06-25T08:57:03Z")

</div>

Hey Guys, I’m trying to mock the Rails Logger for the following code: … rescue TimeoutError =\> error $logger.error("#{self.name} Timeout for #{path}: #{error}") and return rescue SocketError =\> error $logger.error…

---

## [Mocking MiddleMan](https://www.ruby-forum.com/t/mocking-middleman/141222)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/mocking-middleman/141222 "2008-06-24T22:17:05Z")

</div>

I’m trying to verify (using expectations) that a backgroundrb job is being started. I ran across this thread: http://rubyforge.org/pipermail/rspec-users/2007-October/004115.html , in which Pat M. conditionally loads b…

---

## [Story HTML output](https://www.ruby-forum.com/t/story-html-output/141328)

<div class="topic-metadata">

**Author:** [@hayafirst](https://www.ruby-forum.com/u/hayafirst)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/story-html-output/141328 "2008-06-24T18:54:17Z")

</div>

Hi, If I write the HTML format stories output to ~/ccrb\_build-build\_number/Stories/index.html. To get all styles rendered, I also need to copy /vendor/plugins/rspec/story\_server/prototype/stylesheets/ and /vendor/pl…

---

## [Rspec-Rails setting a header in stories?](https://www.ruby-forum.com/t/rspec-rails-setting-a-header-in-stories/141315)

<div class="topic-metadata">

**Author:** [@mjacobs](https://www.ruby-forum.com/u/mjacobs)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/rspec-rails-setting-a-header-in-stories/141315 "2008-06-24T18:34:06Z")

</div>

Hi there, For my api controllers I need the following; request.ssl? == true and an api key “request.env\[‘HTTP\_OUR\_API\_KEY’\]” In my spec/controllers I just stub out the required code but in stories I don’t want any …

---

## [Suggestions on how to use stub\_model with webrat?](https://www.ruby-forum.com/t/suggestions-on-how-to-use-stub-model-with-webrat/141318)

<div class="topic-metadata">

**Author:** [@Danny\_Sofer](https://www.ruby-forum.com/u/Danny_Sofer)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/suggestions-on-how-to-use-stub-model-with-webrat/141318 "2008-06-24T17:50:58Z")

</div>

Hi all, I am using story runner with webrat, but I am not sure how to incorporate stub\_model into my tests. The webrat steps only care about the user interface and have nothing to say about interaction with the datab…

---

## [Before\_save model callback rspec testing](https://www.ruby-forum.com/t/before-save-model-callback-rspec-testing/141000)

<div class="topic-metadata">

**Author:** [@csbartus](https://www.ruby-forum.com/u/csbartus)\
**Replies:** 15\
**Last updated:** [June 24, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/before-save-model-callback-rspec-testing/141000 "2008-06-24T17:20:50Z")

</div>

hi all, i’m learning rspec and i can’t figure out how to test if a callback is executed in a model. my model code is: class User \< ActiveRecord::Base before\_save :encrypt\_password … def encrypt(password) self.cla…

---

## [RSpec Website not accessible at www.rspec.info](https://www.ruby-forum.com/t/rspec-website-not-accessible-at-www-rspec-info/141129)

<div class="topic-metadata">

**Author:** [@Matthias\_Hennemeyer](https://www.ruby-forum.com/u/Matthias_Hennemeyer)\
**Replies:** 3\
**Last updated:** [June 22, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/rspec-website-not-accessible-at-www-rspec-info/141129 "2008-06-22T18:45:46Z")

</div>

Hi, it would be nice if the rspec site could be also available at www.rspec.info. Matthias

---

## [View Testing: Action with parameters](https://www.ruby-forum.com/t/view-testing-action-with-parameters/141094)

<div class="topic-metadata">

**Author:** [@Britt\_Mileshosky](https://www.ruby-forum.com/u/Britt_Mileshosky)\
**Replies:** 4\
**Last updated:** [June 22, 2008, 12:46am UTC](https://www.ruby-forum.com/t/view-testing-action-with-parameters/141094 "2008-06-22T00:46:17Z")

</div>

I’m looking for the solution to testing for the correct format of a form action with extra parameters in the url in my view tests. I’m probably overlooking something simple, but I cannot figure out why this is not wor…

---

## [Story for Rest](https://www.ruby-forum.com/t/story-for-rest/141005)

<div class="topic-metadata">

**Author:** [@reivilo](https://www.ruby-forum.com/u/reivilo)\
**Replies:** 2\
**Last updated:** [June 21, 2008, 12:06am UTC](https://www.ruby-forum.com/t/story-for-rest/141005 "2008-06-21T00:06:37Z")

</div>

Hello all, I’m trying to write a story for a rest resource. Here’s what I have so far: Story “Get prices for specific book”, %{ As a client I want to get a list of prices for a specific book So that I can use it on…

---

## [MVC testing vs. models & Webrat+RailsStory?](https://www.ruby-forum.com/t/mvc-testing-vs-models-webrat-railsstory/140899)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 6\
**Last updated:** [June 20, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/mvc-testing-vs-models-webrat-railsstory/140899 "2008-06-20T20:10:23Z")

</div>

I just read David C.'s slides from RailsConf. I was at RailsConf, but was unable to attend the session. The slides are excellent, and I’ve recently become VERY interested in stories. In particular I’m a bit unhappy…

---

## [Testing routes](https://www.ruby-forum.com/t/testing-routes/140922)

<div class="topic-metadata">

**Author:** [@reivilo](https://www.ruby-forum.com/u/reivilo)\
**Replies:** 2\
**Last updated:** [June 20, 2008, 3:01pm UTC](https://www.ruby-forum.com/t/testing-routes/140922 "2008-06-20T15:01:49Z")

</div>

Hello, I’m creating a REST resource with the following map \*map.resources :books, :member =\> { :prices =\> :get } \* I would like to test the books controller class BooksController \< ApplicationController def prices …

---

## [Autotest/RSpec 1.1.4/Rails 2.1 Infinite Loop?](https://www.ruby-forum.com/t/autotest-rspec-1-1-4-rails-2-1-infinite-loop/139404)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 5\
**Last updated:** [June 19, 2008, 7:39pm UTC](https://www.ruby-forum.com/t/autotest-rspec-1-1-4-rails-2-1-infinite-loop/139404 "2008-06-19T19:39:58Z")

</div>

I just got back from RailsConf, and upgraded on of my development apps to 2.1, and now autotest is going into an infinite loop. It runs tests continuously instead of waiting for files to be saved before rerunning. Has…

---

## [\`const\_missing': uninitialized constant Spec::Rails](https://www.ruby-forum.com/t/const-missing-uninitialized-constant-spec-rails/131917)

<div class="topic-metadata">

**Author:** [@mitjok](https://www.ruby-forum.com/u/mitjok)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 11:26am UTC](https://www.ruby-forum.com/t/const-missing-uninitialized-constant-spec-rails/131917 "2008-06-19T11:26:54Z")

</div>

Hi! I’m experiencing such error while running simple model rspec just to make sure everything is working. $ script/spec spec/models/site\_user\_spec.rb /var/lib/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/depe…

---

## [Reusing story snippets](https://www.ruby-forum.com/t/reusing-story-snippets/140460)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 15\
**Last updated:** [June 18, 2008, 7:59pm UTC](https://www.ruby-forum.com/t/reusing-story-snippets/140460 "2008-06-18T19:59:53Z")

</div>

I find myself doing this: Scenario “logged in user visiting the home page” do Given “A logged in user” do a\_logged\_in\_user end When “…” Then “…” end The a\_logged\_in\_user method is a helper method in helper.rb whi…

---

## [Confused - which is the correct Story API](https://www.ruby-forum.com/t/confused-which-is-the-correct-story-api/140729)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 1\
**Last updated:** [June 18, 2008, 2:23am UTC](https://www.ruby-forum.com/t/confused-which-is-the-correct-story-api/140729 "2008-06-18T02:23:00Z")

</div>

Hi, I am confused (a normal state for me) about the State-Of-The-Art Story API to use. examples/calculator.rb has one syntax, the Blogs have another Syntax, so do the various tutorials. I realize that Stories are on…

---

## [Render\_to\_string confusing ControllerSpec](https://www.ruby-forum.com/t/render-to-string-confusing-controllerspec/140626)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 7\
**Last updated:** [June 17, 2008, 1:16pm UTC](https://www.ruby-forum.com/t/render-to-string-confusing-controllerspec/140626 "2008-06-17T13:16:09Z")

</div>

Hi all, I have a controller I’m trying to spec out, and I’m running into some issues with render\_to\_string. Basically, the show gets an array of objects, calls render\_to\_string for each of them, and then renders the …

---

## [Rspec license plate](https://www.ruby-forum.com/t/rspec-license-plate/140634)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [June 17, 2008, 12:16am UTC](https://www.ruby-forum.com/t/rspec-license-plate/140634 "2008-06-17T00:16:29Z")

</div>

I was driving to my parents’ house this weekend and saw this in their neighborhood: http://bakineggs.com/rspec1.jpg Whoever owns this car is awesome in my book.

---

## [Re: rspec license plate](https://www.ruby-forum.com/t/re-rspec-license-plate/140637)

<div class="topic-metadata">

**Author:** [@Al\_Chou](https://www.ruby-forum.com/u/Al_Chou)\
**Replies:** 0\
**Last updated:** [June 16, 2008, 11:53pm UTC](https://www.ruby-forum.com/t/re-rspec-license-plate/140637 "2008-06-16T23:53:01Z")

</div>

And notice that the car’s red. Not ruby red, but then rubies usually aren’t really the shade of red that most people think they should be. Al ----- Original Message ---- From: Daniel B. removed\_email\_address@domain.…

---

## [Minimise scenarios](https://www.ruby-forum.com/t/minimise-scenarios/140581)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 2\
**Last updated:** [June 16, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/minimise-scenarios/140581 "2008-06-16T14:13:45Z")

</div>

Hi, I have a number of scenarios that are virtually the same apart from one piece of test data Scenario: The user is returned search links with expected search text description Given a logged in xx user When clicks…

---

## [Create haml files with rspec\_controller command?](https://www.ruby-forum.com/t/create-haml-files-with-rspec-controller-command/140526)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 2\
**Last updated:** [June 15, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/create-haml-files-with-rspec-controller-command/140526 "2008-06-15T19:18:36Z")

</div>

It is a nuisance to have to rename all of your files from .erb to .haml. Is there a quick way around this?

---

## [RSpec story failing because of routing error on "/"](https://www.ruby-forum.com/t/rspec-story-failing-because-of-routing-error-on/140507)

<div class="topic-metadata">

**Author:** [@Danny\_Sofer](https://www.ruby-forum.com/u/Danny_Sofer)\
**Replies:** 2\
**Last updated:** [June 15, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/rspec-story-failing-because-of-routing-error-on/140507 "2008-06-15T15:11:18Z")

</div>

Greetings! Here’s the problem. When running tests on the restful\_authentication plugin, I am getting a routing error on “/”. Which I don’t really understand, because the route “/” certainly does exist as I can confi…

---

## [The Given, When, Then framework](https://www.ruby-forum.com/t/the-given-when-then-framework/140480)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 5\
**Last updated:** [June 14, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/the-given-when-then-framework/140480 "2008-06-14T20:48:11Z")

</div>

Hi, Is the Given, When, Then framework, the user story, the acceptance criteria or both? Aidy

---

## [Help with test design](https://www.ruby-forum.com/t/help-with-test-design/140192)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 3\
**Last updated:** [June 14, 2008, 11:14am UTC](https://www.ruby-forum.com/t/help-with-test-design/140192 "2008-06-14T11:14:18Z")

</div>

I’m having trouble figuring out how to drive the design of a class. I’m hoping I can get a hint or two from the more experienced BDDers on this list. I’m writing an adapter class that sits between a 3rd party library …

---

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

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/test-ignore/140424 "2008-06-13T22:26:15Z")

</div>

Verify I can successfully send to the list.

---

## [RSpec and Rails 2.1](https://www.ruby-forum.com/t/rspec-and-rails-2-1/140420)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/rspec-and-rails-2-1/140420 "2008-06-13T19:16:35Z")

</div>

ON: Fri, 13 Jun 2008 11:47:22 -0500, David C. removed\_email\_address@domain.invalid wrote: For some reason rails is not finding rspec in vendor/plugins. Don’t know why. Has Rails 2.1.0 changed the loading precedenc…

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

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