# RSpec

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

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

---

## [Newbie question Context vs Describe](https://www.ruby-forum.com/t/newbie-question-context-vs-describe/130019)

<div class="topic-metadata">

**Author:** [@objo](https://www.ruby-forum.com/u/objo)\
**Replies:** 3\
**Last updated:** [February 26, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/newbie-question-context-vs-describe/130019 "2008-02-26T16:28:58Z")

</div>

Background just started programming in Ruby literally 12 hours ago and have a question regarding context and describe methods. Reading the RDoc it indicated that “context” is an alias for “describe”. So I decided t…

---

## [Test data problem (in general and with acts\_as\_tree)](https://www.ruby-forum.com/t/test-data-problem-in-general-and-with-acts-as-tree/130206)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 9\
**Last updated:** [February 26, 2008, 3:38pm UTC](https://www.ruby-forum.com/t/test-data-problem-in-general-and-with-acts-as-tree/130206 "2008-02-26T15:38:20Z")

</div>

Hi all I’m having problems with data in my specs - i’m probably just going about things the wrong way though. I’m testing a model (called Property) that uses acts\_as\_tree, and for now have just done some specs for …

---

## [A Jedit mode for stories](https://www.ruby-forum.com/t/a-jedit-mode-for-stories/130224)

<div class="topic-metadata">

**Author:** [@JHJHJH](https://www.ruby-forum.com/u/JHJHJH)\
**Replies:** 0\
**Last updated:** [February 26, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/a-jedit-mode-for-stories/130224 "2008-02-26T14:54:58Z")

</div>

For other folks who use jedit, here is a little Mode script for editing stories to keep things looking nice: Just place this in your ~/.jedit/modes/ directory and add the MODE NAME tag to the catalog file in that same…

---

## [Autotest with TDD "test-first" problem](https://www.ruby-forum.com/t/autotest-with-tdd-test-first-problem/129980)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 4\
**Last updated:** [February 26, 2008, 6:41am UTC](https://www.ruby-forum.com/t/autotest-with-tdd-test-first-problem/129980 "2008-02-26T06:41:35Z")

</div>

Hi, I’m mostly quite happy using autotest with rspec, but there’s one thing that’s been bothering me, and as my test suite grows larger it’d becoming more painful. Autotest re-runs the entire suite whenever a spec th…

---

## [\[newbie\] rspec textmate bundle problem](https://www.ruby-forum.com/t/newbie-rspec-textmate-bundle-problem/186777)

<div class="topic-metadata">

**Author:** [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Replies:** 2\
**Last updated:** [February 26, 2008, 5:43am UTC](https://www.ruby-forum.com/t/newbie-rspec-textmate-bundle-problem/186777 "2008-02-26T05:43:00Z")

</div>

Hello, I’ve just installed the rspec textmate bundle from svn, and I’m getting the following error when I try to run a single example: /Users/oliver/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support…

---

## [\[newbie\] rspec textmate bundle problem](https://www.ruby-forum.com/t/newbie-rspec-textmate-bundle-problem/130167)

<div class="topic-metadata">

**Author:** [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Replies:** 0\
**Last updated:** [February 26, 2008, 12:27am UTC](https://www.ruby-forum.com/t/newbie-rspec-textmate-bundle-problem/130167 "2008-02-26T00:27:37Z")

</div>

Hello, I’ve just installed the rspec textmate bundle from svn, and I’m getting the following error when I try to run a single example: /Users/oliver/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support…

---

## [Problems running pre-commit](https://www.ruby-forum.com/t/problems-running-pre-commit/186730)

<div class="topic-metadata">

**Author:** [@rupert](https://www.ruby-forum.com/u/rupert)\
**Replies:** 5\
**Last updated:** [February 25, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/problems-running-pre-commit/186730 "2008-02-25T18:18:38Z")

</div>

Have been having some probs getting the pre-commit to run so help would be appreciated (then I can add some specs to my patch) - thanks for the suggestion to post here Dave :slight\_smile: I’m on OS X and have checked …

---

## [Problems running pre-commit](https://www.ruby-forum.com/t/problems-running-pre-commit/130119)

<div class="topic-metadata">

**Author:** [@rupert](https://www.ruby-forum.com/u/rupert)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/problems-running-pre-commit/130119 "2008-02-25T16:08:40Z")

</div>

Have been having some probs getting the pre-commit to run so help would be appreciated (then I can add some specs to my patch) - thanks for the suggestion to post here Dave :slight\_smile: I’m on OS X and have checked …

---

## [Route generation inside mailer specs](https://www.ruby-forum.com/t/route-generation-inside-mailer-specs/130101)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 0\
**Last updated:** [February 25, 2008, 12:15pm UTC](https://www.ruby-forum.com/t/route-generation-inside-mailer-specs/130101 "2008-02-25T12:15:10Z")

</div>

Rails mailers live under “app/models” even though they have some controller-like responsibilities, and I stick the corresponding specs under “spec/models” In one of my mailers I use the kind of dynamic route generatio…

---

## [How to dump contents produced during spec evaluation?](https://www.ruby-forum.com/t/how-to-dump-contents-produced-during-spec-evaluation/130053)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 6\
**Last updated:** [February 25, 2008, 1:43am UTC](https://www.ruby-forum.com/t/how-to-dump-contents-produced-during-spec-evaluation/130053 "2008-02-25T01:43:26Z")

</div>

In a story, I have the following happening: post("/resources/", ‘resource’ =\> request\_attrs) response.should render\_template(‘resource/new’) response.should have\_tag(’\*’, /must have one or more X defined/) In the Res…

---

## [Rake task for stories](https://www.ruby-forum.com/t/rake-task-for-stories/129984)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 3\
**Last updated:** [February 24, 2008, 12:10am UTC](https://www.ruby-forum.com/t/rake-task-for-stories/129984 "2008-02-24T00:10:04Z")

</div>

Any reason why there isn’t a rake task for stories yet? (I’m looking in trunk) Someone want to share theirs? Joe

---

## [Specs versus Stories](https://www.ruby-forum.com/t/specs-versus-stories/129422)

<div class="topic-metadata">

**Author:** [@bluestar](https://www.ruby-forum.com/u/bluestar)\
**Replies:** 8\
**Last updated:** [February 23, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/specs-versus-stories/129422 "2008-02-23T21:14:15Z")

</div>

I am new to BDD and have been doing some reading and playing with rSpec. I am a little confused. I am not sure what the best practice for using stories and specs. Should I be writing stories first, then specs that …

---

## [Disabling transactional fixtures for one spec](https://www.ruby-forum.com/t/disabling-transactional-fixtures-for-one-spec/129978)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 1\
**Last updated:** [February 23, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/disabling-transactional-fixtures-for-one-spec/129978 "2008-02-23T15:23:52Z")

</div>

Sometimes I need a spec that tests something which can’t work inside a transaction. Is it possible to disable transactional fixtures for one spec? I tried: describe “MyClass without transactional fixtures” do before…

---

## [Story teardowns?](https://www.ruby-forum.com/t/story-teardowns/125708)

<div class="topic-metadata">

**Author:** [@Andreas\_Axelsson](https://www.ruby-forum.com/u/Andreas_Axelsson)\
**Replies:** 3\
**Last updated:** [February 23, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/story-teardowns/125708 "2008-02-23T14:53:57Z")

</div>

Does the plain text story framework support teardowns? There doesn’t seem to be anywhere to put an “after” method. My stories test an application which parses and modifies a directory tree, which is currently generate…

---

## [Webrat integration with Rspec and Rake tasks](https://www.ruby-forum.com/t/webrat-integration-with-rspec-and-rake-tasks/129570)

<div class="topic-metadata">

**Author:** [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Replies:** 7\
**Last updated:** [February 23, 2008, 9:12am UTC](https://www.ruby-forum.com/t/webrat-integration-with-rspec-and-rake-tasks/129570 "2008-02-23T09:12:12Z")

</div>

Hi, I am trying to get Webrat integrated with RSpec. I’ve followed the steps in the various blog posts about this, but have one sniggling little issue. It might be a Webrat issue, but I am hoping the RSpec folks migh…

---

## [Old Style Stories](https://www.ruby-forum.com/t/old-style-stories/129623)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 8\
**Last updated:** [February 23, 2008, 4:24am UTC](https://www.ruby-forum.com/t/old-style-stories/129623 "2008-02-23T04:24:35Z")

</div>

I was working on a past project tonight to trunk which is using the old story format. IE: Given “desc” do / end When "someting "do /end etc… Is this officially supported, or is this just something that hasn’t been …

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/129799)

<div class="topic-metadata">

**Author:** [@Anthony\_Broad-Crawf](https://www.ruby-forum.com/u/Anthony_Broad-Crawf)\
**Replies:** 2\
**Last updated:** [February 22, 2008, 4:48am UTC](https://www.ruby-forum.com/t/newbie-question/129799 "2008-02-22T04:48:12Z")

</div>

I am testing an action on a controller and cannot seem to find the syntax to stub a method call off of the controller I am testing. pseudo code class SomeController \< \< ApplicationController def some\_action stuff st…

---

## [Run all tests after success](https://www.ruby-forum.com/t/run-all-tests-after-success/129289)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 7\
**Last updated:** [February 21, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/run-all-tests-after-success/129289 "2008-02-21T17:30:24Z")

</div>

I seem to remember when I was running a previous version of rspec and autotest that when a set of specs passed for some changed files, that all of the specs would then be run automatically. Particularly when tests ha…

---

## [Rspec, stories and web services](https://www.ruby-forum.com/t/rspec-stories-and-web-services/129791)

<div class="topic-metadata">

**Author:** [@Abdullah\_J](https://www.ruby-forum.com/u/Abdullah_J)\
**Replies:** 0\
**Last updated:** [February 21, 2008, 4:22pm UTC](https://www.ruby-forum.com/t/rspec-stories-and-web-services/129791 "2008-02-21T16:22:27Z")

</div>

Hi All, I’m just getting into Rspec and have a couple questions to get my head around this: 1- Testing web services: is this a good fit for User Stories? 2- The web services run on ActionWebServices, should I be doin…

---

## [Unwanted fixture data messing up my other tests](https://www.ruby-forum.com/t/unwanted-fixture-data-messing-up-my-other-tests/129772)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [February 21, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/unwanted-fixture-data-messing-up-my-other-tests/129772 "2008-02-21T15:00:08Z")

</div>

I have a fixture for one of my tables that i use in some model tests. The data in it is messing up some other tests for a different model, that doesn’t ask for the fixture - isn’t the fixture data supposed to be clea…

---

## [\[ANN\] RSpec mailing list Google Group mirror](https://www.ruby-forum.com/t/ann-rspec-mailing-list-google-group-mirror/129765)

<div class="topic-metadata">

**Author:** [@rubyphunk](https://www.ruby-forum.com/u/rubyphunk)\
**Replies:** 0\
**Last updated:** [February 21, 2008, 11:12am UTC](https://www.ruby-forum.com/t/ann-rspec-mailing-list-google-group-mirror/129765 "2008-02-21T11:12:37Z")

</div>

Hi. I’ve created a Google Group ‘rspec’ that acts as a mirror to the RSpec- users mailing list. You can find the group at http://groups.google.com/group/rspec. lg – andreas

---

## [Spec\_server requiring absolute paths (and autotest breaking)](https://www.ruby-forum.com/t/spec-server-requiring-absolute-paths-and-autotest-breaking/129557)

<div class="topic-metadata">

**Author:** [@jarkko](https://www.ruby-forum.com/u/jarkko)\
**Replies:** 8\
**Last updated:** [February 21, 2008, 7:48am UTC](https://www.ruby-forum.com/t/spec-server-requiring-absolute-paths-and-autotest-breaking/129557 "2008-02-21T07:48:10Z")

</div>

rspec and rspec\_on\_rails rev 3316, ZenTest 3.9.1 When run through spec\_server, running spec fails if the spec file is not specified with an absolute path: Probutanol:koulutusweb jarkko$ script/spec --options spec/spec…

---

## [Shared scenarios?](https://www.ruby-forum.com/t/shared-scenarios/129690)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 4\
**Last updated:** [February 21, 2008, 5:53am UTC](https://www.ruby-forum.com/t/shared-scenarios/129690 "2008-02-21T05:53:51Z")

</div>

In the story framework I would like to have tests that mix and match scenarios using GivenScenario so for example a scenario that does scenarios A, B, C in various orders. Right now all scenarios need to be self-stan…

---

## [Newbie - am I on the right track?](https://www.ruby-forum.com/t/newbie-am-i-on-the-right-track/129719)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/newbie-am-i-on-the-right-track/129719 "2008-02-20T22:44:26Z")

</div>

A few days ago I posted a message asking for help in pointing out examples of rspec in the wild. I took the input from that thread, looked through specs from random projects on rubyforge, and pored over the docs. I de…

---

## [Does the rspec\_scaffold generator know about :references?](https://www.ruby-forum.com/t/does-the-rspec-scaffold-generator-know-about-references/129629)

<div class="topic-metadata">

**Author:** [@mith](https://www.ruby-forum.com/u/mith)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 1:29pm UTC](https://www.ruby-forum.com/t/does-the-rspec-scaffold-generator-know-about-references/129629 "2008-02-20T13:29:11Z")

</div>

I checked out the CURRENT release of rspec and rails\_spec as outlined on the rubyforge page. I am having trouble with models that use the :references column type. I get tests with syntax errors after generating a n…

---

## [Render\_to\_string in a controller test?](https://www.ruby-forum.com/t/render-to-string-in-a-controller-test/129510)

<div class="topic-metadata">

**Author:** [@EAW](https://www.ruby-forum.com/u/EAW)\
**Replies:** 3\
**Last updated:** [February 20, 2008, 7:32am UTC](https://www.ruby-forum.com/t/render-to-string-in-a-controller-test/129510 "2008-02-20T07:32:22Z")

</div>

Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don’t test views etc. However, I think I’ve run into a situation that might be an exception. My controller use…

---

## [Playing Sounds with Autotest/RSpec on Cygwin](https://www.ruby-forum.com/t/playing-sounds-with-autotest-rspec-on-cygwin/129631)

<div class="topic-metadata">

**Author:** [@Andy\_Leak](https://www.ruby-forum.com/u/Andy_Leak)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 7:22am UTC](https://www.ruby-forum.com/t/playing-sounds-with-autotest-rspec-on-cygwin/129631 "2008-02-20T07:22:24Z")

</div>

I’ve read about integrating Growl with Autotest/RSpec to display test results. For cygwin users - here is a snippet that will play a sound after autotest runs. Add the code below to your ~/.autotest file. Modify the…

---

## [Mocking kills usefullness of controller tests?](https://www.ruby-forum.com/t/mocking-kills-usefullness-of-controller-tests/129589)

<div class="topic-metadata">

**Author:** [@arturaz](https://www.ruby-forum.com/u/arturaz)\
**Replies:** 1\
**Last updated:** [February 19, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/mocking-kills-usefullness-of-controller-tests/129589 "2008-02-19T22:56:32Z")

</div>

Hello, Let’s say we mock our User objects in controllers. Then we change attr\_accessible in user.rb. Model tests break, controller do not. You fix the model ones and go on thinking everything is ok when it’s not (the…

---

## [Deep test with rspec?](https://www.ruby-forum.com/t/deep-test-with-rspec/127922)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 9\
**Last updated:** [February 19, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/deep-test-with-rspec/127922 "2008-02-19T22:45:22Z")

</div>

All, Has anyone on this list tried to use DeepTest\[1\] with rspec? My initial attempts have failed so I would be really interested if someone has figured it out. Thanks. -Ben http://www.somethingnimble.com/bliki/d…

---

## [RSpec and script/console?](https://www.ruby-forum.com/t/rspec-and-script-console/129564)

<div class="topic-metadata">

**Author:** [@Andy\_Leak](https://www.ruby-forum.com/u/Andy_Leak)\
**Replies:** 1\
**Last updated:** [February 19, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/rspec-and-script-console/129564 "2008-02-19T19:01:08Z")

</div>

I am a rSpec newbie. When learning ruby and rails, I found the console to be a really helpful tool. But I haven’t been able to figure out how to drive RSpec from the console. Is using rSpec with the Console even a v…

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

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