# RSpec

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

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

---

## [Getting Class in Shared Behaviours](https://www.ruby-forum.com/t/getting-class-in-shared-behaviours/120936)

<div class="topic-metadata">

**Author:** [@liquid](https://www.ruby-forum.com/u/liquid)\
**Replies:** 21\
**Last updated:** [November 23, 2007, 2:46am UTC](https://www.ruby-forum.com/t/getting-class-in-shared-behaviours/120936 "2007-11-23T02:46:35Z")

</div>

Hi, I want to be able to get at the described class in my shared behaviour. I’m sure an example will say it better than my words describe “my shared”, :shared =\> true do it “should tell me what the class is its desc…

---

## [Re: Initial run of RSpec 1.0.8 on MS-WinXPproSP2](https://www.ruby-forum.com/t/re-initial-run-of-rspec-1-0-8-on-ms-winxpprosp2/121035)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [November 23, 2007, 12:25am UTC](https://www.ruby-forum.com/t/re-initial-run-of-rspec-1-0-8-on-ms-winxpprosp2/121035 "2007-11-23T00:25:12Z")

</div>

On Thu, November 22, 2007 17:42, David C. wrote: Did you run this? ruby script/generate rspec Yes I did. I forgot to report this however. rake spec:models The db creation should happen some time before running ra…

---

## [Initial run of RSpec 1.0.8 on MS-WinXPproSP2](https://www.ruby-forum.com/t/initial-run-of-rspec-1-0-8-on-ms-winxpprosp2/121030)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [November 22, 2007, 10:56pm UTC](https://www.ruby-forum.com/t/initial-run-of-rspec-1-0-8-on-ms-winxpprosp2/121030 "2007-11-22T22:56:19Z")

</div>

Rails 1.2.5 Ruby 1.8.6 Rake 0.7.3 RSpec 1.0.8 PostgreSQL 8.2.5 I am experiencing a problem with the “rake spec spec” task on an initial trial of rspec. After creating the rails app I installed rspec and rspec\_on\_…

---

## [Issues related to jruby 1.0.2/edge rails and rspec head](https://www.ruby-forum.com/t/issues-related-to-jruby-1-0-2-edge-rails-and-rspec-head/121010)

<div class="topic-metadata">

**Author:** [@Stefan\_Magnus\_Landr](https://www.ruby-forum.com/u/Stefan_Magnus_Landr)\
**Replies:** 1\
**Last updated:** [November 22, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/issues-related-to-jruby-1-0-2-edge-rails-and-rspec-head/121010 "2007-11-22T19:55:45Z")

</div>

Hi, We just spent half an afternoon figuring out why “jruby -S rake spec” didn’t generate any output at all (no warnings) on an edge rails app. We were seeing different behaviour on different boxes, and after a while…

---

## [Describe AddressesController, "handling GET /addresses" do](https://www.ruby-forum.com/t/describe-addressescontroller-handling-get-addresses-do/120864)

<div class="topic-metadata">

**Author:** [@cienfuegos](https://www.ruby-forum.com/u/cienfuegos)\
**Replies:** 7\
**Last updated:** [November 22, 2007, 5:52pm UTC](https://www.ruby-forum.com/t/describe-addressescontroller-handling-get-addresses-do/120864 "2007-11-22T17:52:06Z")

</div>

Hello, I’m working with scaffold generated controller test code for handling GET requests. Address is the model being tested. Address belongs\_to Company, Company has\_many addresses. In my addresses\_controller I have…

---

## [Changes to spec\_helper in trunk r2952](https://www.ruby-forum.com/t/changes-to-spec-helper-in-trunk-r2952/120978)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [November 22, 2007, 11:15am UTC](https://www.ruby-forum.com/t/changes-to-spec-helper-in-trunk-r2952/120978 "2007-11-22T11:15:30Z")

</div>

If you’re keeping up to date with trunk, don’t forget to run script/generate rspec. Revision 2952 includes a small change to spec/spec\_helper.rb. Cheers, David

---

## [Autotest rspec issues](https://www.ruby-forum.com/t/autotest-rspec-issues/120800)

<div class="topic-metadata">

**Author:** [@greenbox](https://www.ruby-forum.com/u/greenbox)\
**Replies:** 5\
**Last updated:** [November 22, 2007, 12:05am UTC](https://www.ruby-forum.com/t/autotest-rspec-issues/120800 "2007-11-22T00:05:41Z")

</div>

I’m having trouble getting autotest to run “out of the box” with rspec. I’ve got a Leopard setup with Zentest 3.5.0, rspec on trunk, and rails 2.0PR. No “.autotest” file. There are a couple of issues: Running ‘aut…

---

## [Describe scope](https://www.ruby-forum.com/t/describe-scope/120893)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 7\
**Last updated:** [November 21, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/describe-scope/120893 "2007-11-21T23:36:34Z")

</div>

Hi, Googling ‘RSpec describe scope’ didn’t yield much, so apologies if this question has been dealt with. It seem well known that a ruby class is ‘visible’ between describes, and if this is a problem then you should …

---

## [When you sometimes wonder how to test this?](https://www.ruby-forum.com/t/when-you-sometimes-wonder-how-to-test-this/120931)

<div class="topic-metadata">

**Author:** [@codejoy](https://www.ruby-forum.com/u/codejoy)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/when-you-sometimes-wonder-how-to-test-this/120931 "2007-11-21T21:53:12Z")

</div>

Hi Just something that I have been finding very helpful sometimes when I am stuck with “how could I test this?” moments is looking at the Rails test suite. At the moment I am working on testing our custom error\_messa…

---

## [How thorough do you test?](https://www.ruby-forum.com/t/how-thorough-do-you-test/120918)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 6\
**Last updated:** [November 21, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/how-thorough-do-you-test/120918 "2007-11-21T21:43:41Z")

</div>

Testing models is great and would not be able to create anything without it, but I am finding testing the controllers and views is a pain. Rest based controllers don’t seem to change that much when compared to the aut…

---

## [\[ANN\] Lighthouse and Engine Yard sponsorships](https://www.ruby-forum.com/t/ann-lighthouse-and-engine-yard-sponsorships/120585)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 12\
**Last updated:** [November 21, 2007, 9:10pm UTC](https://www.ruby-forum.com/t/ann-lighthouse-and-engine-yard-sponsorships/120585 "2007-11-21T21:10:12Z")

</div>

Hey all, I’m very happy to announce that ActiveReload\[1\] has generously offered to sponsor a lighthouse\[2\] account for rspec. We’ll be moving ticket tracking there. We’ve already got the account set up and will soon …

---

## [Failing rake task](https://www.ruby-forum.com/t/failing-rake-task/120844)

<div class="topic-metadata">

**Author:** [@Lance\_C](https://www.ruby-forum.com/u/Lance_C)\
**Replies:** 6\
**Last updated:** [November 21, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/failing-rake-task/120844 "2007-11-21T18:12:25Z")

</div>

I’m running rspec and rspec on rails in svn external so I am running the latest version of the trunk. Recently the rake spec task started braking the continuous integration server because the rake aborted. I checked …

---

## [How to test views with Nested Resources and Partials](https://www.ruby-forum.com/t/how-to-test-views-with-nested-resources-and-partials/120835)

<div class="topic-metadata">

**Author:** [@Troy\_Nini](https://www.ruby-forum.com/u/Troy_Nini)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/how-to-test-views-with-nested-resources-and-partials/120835 "2007-11-21T16:07:35Z")

</div>

Hi everyone, I am relatively new to rspec and I am running into a wall in testing my views. I have a RESTful resource Contracts with a nested resource of Line\_items. I am trying to figure out how to test the “edit” f…

---

## [Testing transactional updates in story runner](https://www.ruby-forum.com/t/testing-transactional-updates-in-story-runner/120882)

<div class="topic-metadata">

**Author:** [@jarkko](https://www.ruby-forum.com/u/jarkko)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 1:10pm UTC](https://www.ruby-forum.com/t/testing-transactional-updates-in-story-runner/120882 "2007-11-21T13:10:22Z")

</div>

How do you guys test transactional updates with story runner? I have an action that needs to update four different models: Enrollment.transaction do @contact.update\_addresses(params\[:contact\_address\], params \[:bil…

---

## [Stories and Pending Actions](https://www.ruby-forum.com/t/stories-and-pending-actions/120606)

<div class="topic-metadata">

**Author:** [@confundido](https://www.ruby-forum.com/u/confundido)\
**Replies:** 5\
**Last updated:** [November 21, 2007, 9:13am UTC](https://www.ruby-forum.com/t/stories-and-pending-actions/120606 "2007-11-21T09:13:30Z")

</div>

I can’t get my plain text stories to show pending actions like the example addition plain text story. Any tips? (See below) http://pastie.caboo.se/119627 Nathan S. removed\_email\_address@domain.invalid rspec edge r…

---

## [Cap deploy:spec](https://www.ruby-forum.com/t/cap-deploy-spec/120836)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 4\
**Last updated:** [November 21, 2007, 3:29am UTC](https://www.ruby-forum.com/t/cap-deploy-spec/120836 "2007-11-21T03:29:03Z")

</div>

fyi, I just posted this http://www.vaporbase.com/postings/Running\_rspec\_after\_you\_deploy linoj

---

## [How to test views with Nested Resources and Partials](https://www.ruby-forum.com/t/how-to-test-views-with-nested-resources-and-partials/120834)

<div class="topic-metadata">

**Author:** [@Troy\_Nini](https://www.ruby-forum.com/u/Troy_Nini)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/how-to-test-views-with-nested-resources-and-partials/120834 "2007-11-20T23:08:18Z")

</div>

Hi everyone, I am relatively new to rspec and I am running into a wall in testing my views. I have a RESTful resource Contracts with a nested resource of Line\_items. I am trying to figure out how to test the “edit” f…

---

## [Re: confirming that a model instance was correctly created from POST params](https://www.ruby-forum.com/t/re-confirming-that-a-model-instance-was-correctly-created-from-post-params/120802)

<div class="topic-metadata">

**Author:** [@Al\_Chou](https://www.ruby-forum.com/u/Al_Chou)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/re-confirming-that-a-model-instance-was-correctly-created-from-post-params/120802 "2007-11-20T18:37:17Z")

</div>

Thanks, Jarkko. Substruct is not my code, so I don’t know how OrderHelper got to be so big. I’m not sure I want to refactor its contents into Order just to make it easier to write the examples for my addition, but a…

---

## [Rake spec default environment](https://www.ruby-forum.com/t/rake-spec-default-environment/118613)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 7\
**Last updated:** [November 20, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/rake-spec-default-environment/118613 "2007-11-20T18:03:11Z")

</div>

hi, When I run rake spec , it seems to be starting with my default environment (development or production) and connects to that database, before actually connecting to the test one and proceeding with the tests. Whe…

---

## [Testing Models without fixtures](https://www.ruby-forum.com/t/testing-models-without-fixtures/120775)

<div class="topic-metadata">

**Author:** [@voodoorai2000](https://www.ruby-forum.com/u/voodoorai2000)\
**Replies:** 9\
**Last updated:** [November 20, 2007, 5:28pm UTC](https://www.ruby-forum.com/t/testing-models-without-fixtures/120775 "2007-11-20T17:28:37Z")

</div>

Hi, I would like to test a sorting method that is in the user model, it’s a class method called search. What I would like to do is create 2 users and load the test database with just those 2 users, so that I can call …

---

## [How to represent Story of Life grid in Then clause](https://www.ruby-forum.com/t/how-to-represent-story-of-life-grid-in-then-clause/120722)

<div class="topic-metadata">

**Author:** [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 9:11am UTC](https://www.ruby-forum.com/t/how-to-represent-story-of-life-grid-in-then-clause/120722 "2007-11-20T09:11:32Z")

</div>

In this story from Dan’s Game of Life: Scenario: the grid has three cells Given 3 x 3 grid When I create a cell at 0, 0 And I create a cell at 0, 1 And I create a cell at 2, 2 Then the grid should look like: XX. …

---

## [Confirming that a model instance was correctly created from POST params](https://www.ruby-forum.com/t/confirming-that-a-model-instance-was-correctly-created-from-post-params/225979)

<div class="topic-metadata">

**Author:** [@Al\_Chou](https://www.ruby-forum.com/u/Al_Chou)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 9:05am UTC](https://www.ruby-forum.com/t/confirming-that-a-model-instance-was-correctly-created-from-post-params/225979 "2007-11-20T09:05:05Z")

</div>

I’m wondering whether I’m wasting my time trying to verify that an addition I’ve made to legacy code is in fact setting a new attribute on a model. Substruct’s (http://dev.subimage.com/projects/substruct) OrderHelper …

---

## [\[ANN\] Ticket tracking moved to lighthouse](https://www.ruby-forum.com/t/ann-ticket-tracking-moved-to-lighthouse/120627)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [November 19, 2007, 10:38am UTC](https://www.ruby-forum.com/t/ann-ticket-tracking-moved-to-lighthouse/120627 "2007-11-19T10:38:20Z")

</div>

Hi everyone, We’ve moved ticket tracking for the rspec project to http://rspec.lighthouseapp.com! Thanks to a valiant effort from Chad Humphries, the move was done in an evening. For those of you on the rspec-devel l…

---

## [Help anyone?](https://www.ruby-forum.com/t/help-anyone/120588)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 7\
**Last updated:** [November 19, 2007, 10:31am UTC](https://www.ruby-forum.com/t/help-anyone/120588 "2007-11-19T10:31:16Z")

</div>

Hi everybody. Per http://rubyforge.org/pipermail/rspec-users/2007-November/004572.html, we’re going to be moving ticket tracking over to lighthouse. We’d like to get this rolling sooner than later, but we’re fairly w…

---

## [Down with Lambda!](https://www.ruby-forum.com/t/down-with-lambda/120531)

<div class="topic-metadata">

**Author:** [@sgarcia](https://www.ruby-forum.com/u/sgarcia)\
**Replies:** 7\
**Last updated:** [November 18, 2007, 8:09pm UTC](https://www.ruby-forum.com/t/down-with-lambda/120531 "2007-11-18T20:09:15Z")

</div>

Rspec is all about using natural language to define behavior. In this context, I feel that lambda is sorely out of place. I was chatting on #irc and a pal of mine (wycats) proposed an interesting alternative: alias\_me…

---

## [Re: Using RSpec to drive the design of a GUI desktop	application](https://www.ruby-forum.com/t/re-using-rspec-to-drive-the-design-of-a-gui-desktop-application/120554)

<div class="topic-metadata">

**Author:** [@el-oy](https://www.ruby-forum.com/u/el-oy)\
**Replies:** 4\
**Last updated:** [November 18, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/re-using-rspec-to-drive-the-design-of-a-gui-desktop-application/120554 "2007-11-18T19:58:06Z")

</div>

Hey Mathijs, Someone pinged me that you were interested in BDD with RubyCocoa (RC), so I thought I’d just chip in. I write my RC apps in a BDD way and as such support for it is included with Rucola. When we release …

---

## [Not sure why this is failing](https://www.ruby-forum.com/t/not-sure-why-this-is-failing/120544)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 9\
**Last updated:** [November 18, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/not-sure-why-this-is-failing/120544 "2007-11-18T18:37:17Z")

</div>

I am not sure why the tests don’t see the call of the new method for the Address class. It can be seen in the controller method where the Address.new is called. @address = Address.new(params\[:address\]) What am I…

---

## ['lazy' url generation in view specs](https://www.ruby-forum.com/t/lazy-url-generation-in-view-specs/120259)

<div class="topic-metadata">

**Author:** [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Replies:** 1\
**Last updated:** [November 18, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/lazy-url-generation-in-view-specs/120259 "2007-11-18T16:15:44Z")

</div>

Hi, I would like to use the ‘lazy’ style of url generation in my views, omitting parameters from my calls to url\_for (and named route methods) that are then filled in from the current request parameters. Example: ur…

---

## [Role of stories vs specs](https://www.ruby-forum.com/t/role-of-stories-vs-specs/120106)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 5\
**Last updated:** [November 18, 2007, 11:44am UTC](https://www.ruby-forum.com/t/role-of-stories-vs-specs/120106 "2007-11-18T11:44:12Z")

</div>

I’ve been thinking about the role that stories played compared to specs, and that “should we use should” thread brought those thoughts up again. First I want to discuss whether or not specs are authoritative regardin…

---

## [Using RSpec to drive the design of a GUI desktop application](https://www.ruby-forum.com/t/using-rspec-to-drive-the-design-of-a-gui-desktop-application/120521)

<div class="topic-metadata">

**Author:** [@mlangenberg](https://www.ruby-forum.com/u/mlangenberg)\
**Replies:** 2\
**Last updated:** [November 18, 2007, 1:49am UTC](https://www.ruby-forum.com/t/using-rspec-to-drive-the-design-of-a-gui-desktop-application/120521 "2007-11-18T01:49:16Z")

</div>

Hello everybody, I’ve been using RSpec as a tool to create web applications for some time now, in Rails, and using plain Ruby with WEBrick as well. The tool suits my needs and the story runner is great. Now there ar…

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

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