# RSpec

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

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

---

## [Cucumber and multi-line steps](https://www.ruby-forum.com/t/cucumber-and-multi-line-steps/147268)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 1:49am UTC](https://www.ruby-forum.com/t/cucumber-and-multi-line-steps/147268 "2008-08-30T01:49:12Z")

</div>

Hi all, Where can we add tickets for Cucumber? While trying to migrate a current project I ran into a snag… specially that cucumber does not support multi-line steps like the edge rspec story runner (which makes sen…

---

## [BDDish rspecish question](https://www.ruby-forum.com/t/bddish-rspecish-question/147251)

<div class="topic-metadata">

**Author:** [@bartz](https://www.ruby-forum.com/u/bartz)\
**Replies:** 3\
**Last updated:** [August 29, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/bddish-rspecish-question/147251 "2008-08-29T22:12:00Z")

</div>

Hey list, This is a kinda quirky question for this list, but I do think it belongs here. I’m currently writing an app with users with different roles. Roles are sequentially so to speak, so role 2 can do everything r…

---

## [How much test data to use in specs](https://www.ruby-forum.com/t/how-much-test-data-to-use-in-specs/146804)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 21\
**Last updated:** [August 29, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/how-much-test-data-to-use-in-specs/146804 "2008-08-29T16:15:08Z")

</div>

I’m not sure how much test data I should be using in my specs. I’m writing specs for the Property model in my Rails app. Its “address” attribute is going to be validated with this regex: /\\A\\d+\[a-z\]? \[-’, a-z\]{2,128}\\…

---

## [Error paths: a new scenerio or test in story runner?](https://www.ruby-forum.com/t/error-paths-a-new-scenerio-or-test-in-story-runner/147117)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 2\
**Last updated:** [August 28, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/error-paths-a-new-scenerio-or-test-in-story-runner/147117 "2008-08-28T17:44:34Z")

</div>

Hi, I think the scenario based way of defining acceptance tests is akin to scenarios in use-cases. In use-cases we can have a happy path with extends for error conditions etc. Should I create extra scenarios for my …

---

## [Story runner not running on build machine](https://www.ruby-forum.com/t/story-runner-not-running-on-build-machine/146994)

<div class="topic-metadata">

**Author:** [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Replies:** 6\
**Last updated:** [August 28, 2008, 2:55pm UTC](https://www.ruby-forum.com/t/story-runner-not-running-on-build-machine/146994 "2008-08-28T14:55:36Z")

</div>

Hi, have my stories running fine here on my dev machine but they blow up on the build machine. Rspec and Rspec-rails are installed as plugins When i attempt to run ruby stories/all.rb on the dev server i get this er…

---

## [Array\_including()](https://www.ruby-forum.com/t/array-including/147026)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 3\
**Last updated:** [August 27, 2008, 6:53pm UTC](https://www.ruby-forum.com/t/array-including/147026 "2008-08-27T18:53:56Z")

</div>

I found myself having to write this today: class ArrayMatcher def initialize(array\_to\_match) @array\_to\_match = array\_to\_match end def ==(other) ok = true @array\_to\_match.each do |item| ok = ok and other.inclu…

---

## [Stub\_model() and ActiveRecord Associations](https://www.ruby-forum.com/t/stub-model-and-activerecord-associations/146920)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 9\
**Last updated:** [August 27, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/stub-model-and-activerecord-associations/146920 "2008-08-27T14:42:51Z")

</div>

Hi all, I have what I thought was quite a simple requirement but something to do with the way ActiveRecord’s associations work is making it quite puzzling. I guess I can sum it up with this failing test: before…

---

## [Rspec and rcov](https://www.ruby-forum.com/t/rspec-and-rcov/146812)

<div class="topic-metadata">

**Author:** [@crossblaim](https://www.ruby-forum.com/u/crossblaim)\
**Replies:** 5\
**Last updated:** [August 25, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/rspec-and-rcov/146812 "2008-08-25T23:39:14Z")

</div>

hi everyone, does anyone experience this problem? kain-osx:mysite kain$ rake spec:rcov (in /Users/kain/Sites/mysite) … Finished in 1.567164 seconds 20 examples, 0 failures /usr/local/lib/ruby/1.8/rexml/formatters/…

---

## [Running specs within spec\_server](https://www.ruby-forum.com/t/running-specs-within-spec-server/146755)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 0\
**Last updated:** [August 25, 2008, 5:46am UTC](https://www.ruby-forum.com/t/running-specs-within-spec-server/146755 "2008-08-25T05:46:12Z")

</div>

Hi guys. I’m unable to run my specs through a spec server. I’ve spent several hours searching and playing around with this problem, and I simply can’t find a solution. So if anyone has any suggestions, I’m all ears. D…

---

## [No out for parameterized stories?](https://www.ruby-forum.com/t/no-out-for-parameterized-stories/146745)

<div class="topic-metadata">

**Author:** [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Replies:** 0\
**Last updated:** [August 25, 2008, 2:54am UTC](https://www.ruby-forum.com/t/no-out-for-parameterized-stories/146745 "2008-08-25T02:54:51Z")

</div>

Hi, I just install rspec (and rspec-rails) from git and tried to write a user story, its all good but the output lacks the parameters i used. Here’s an example of what is happening === RSPEC FILE stories/example.rb =…

---

## [Running specs within a spec server](https://www.ruby-forum.com/t/running-specs-within-a-spec-server/146734)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/running-specs-within-a-spec-server/146734 "2008-08-24T21:31:52Z")

</div>

Hi guys. I’m unable to run my specs through a spec server. I’ve spent several hours searching and playing around with this problem, and I simply can’t find a solution. So if anyone has any suggestions, I’m all ears. D…

---

## [What are we spec'ing?](https://www.ruby-forum.com/t/what-are-we-specing/146716)

<div class="topic-metadata">

**Author:** [@iqbalhyd](https://www.ruby-forum.com/u/iqbalhyd)\
**Replies:** 2\
**Last updated:** [August 24, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/what-are-we-specing/146716 "2008-08-24T18:41:22Z")

</div>

Dear All, I’m a new member here. I’ve been using RSpec since my first Rails project. I’m proud that I’ve deliver the most bugs free app in my office (In my country, spec’ing even autotesting is not common). Thanks to…

---

## [Spec'ing exhaustively?](https://www.ruby-forum.com/t/specing-exhaustively/146718)

<div class="topic-metadata">

**Author:** [@iqbalhyd](https://www.ruby-forum.com/u/iqbalhyd)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/specing-exhaustively/146718 "2008-08-24T17:08:18Z")

</div>

Dear All, Before I know spec’ing, I’ve been practicing testing using JUnit. I remember that once Kent Beck said (if I’m not mistaken) that we should not test exhaustively. Instead, we should test until our doubt in th…

---

## [Autotest setup to run Story Runner?](https://www.ruby-forum.com/t/autotest-setup-to-run-story-runner/129193)

<div class="topic-metadata">

**Author:** [@kamal](https://www.ruby-forum.com/u/kamal)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 7:45pm UTC](https://www.ruby-forum.com/t/autotest-setup-to-run-story-runner/129193 "2008-08-22T19:45:27Z")

</div>

Has anyone looked at hooking up the Story Runner to Autotest? Currently, the autotest hooks that rspec uses explicitly runs ./script/ spec, which when pointed to a story runner file doesn’t do anything. (In fact, the …

---

## [Rake spec order of running tests](https://www.ruby-forum.com/t/rake-spec-order-of-running-tests/146509)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 5\
**Last updated:** [August 22, 2008, 4:51pm UTC](https://www.ruby-forum.com/t/rake-spec-order-of-running-tests/146509 "2008-08-22T16:51:45Z")

</div>

We ran into a situation today where running ‘rake spec’ on one machine produced different results than when running on a different machine. My reasoned hunch is that the tests were run in a different order, due to the …

---

## [Cucumber table docs?](https://www.ruby-forum.com/t/cucumber-table-docs/146522)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 0\
**Last updated:** [August 21, 2008, 10:47pm UTC](https://www.ruby-forum.com/t/cucumber-table-docs/146522 "2008-08-21T22:47:07Z")

</div>

Hi, I’m looking at the examples in cucumber, and I see the fit-like tables, but for the life of me I don’t see how they map to the steps, ie how does the table data get fitted into the steps parameters. Maybe some d…

---

## [Rescue\_from failing to rescue \[from\]](https://www.ruby-forum.com/t/rescue-from-failing-to-rescue-from/146503)

<div class="topic-metadata">

**Author:** [@rsl](https://www.ruby-forum.com/u/rsl)\
**Replies:** 1\
**Last updated:** [August 21, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/rescue-from-failing-to-rescue-from/146503 "2008-08-21T20:32:11Z")

</div>

Having some weird failures of rescue\_from in all my specs. They still rescue in actual usage, just not in my specs. Made a pastie of the code: http://pastie.org/257399 This is with latest \[as of 1:00 PM Eastern time z…

---

## [Command line options in story runner run method](https://www.ruby-forum.com/t/command-line-options-in-story-runner-run-method/146168)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 6:46pm UTC](https://www.ruby-forum.com/t/command-line-options-in-story-runner-run-method/146168 "2008-08-20T18:46:03Z")

</div>

Hi, Can anyone give me some sample syntax of using a command line switch in the Story Runner run method please? Thanks Aidy

---

## [RSpec raising routing errors where Rails doesn't?](https://www.ruby-forum.com/t/rspec-raising-routing-errors-where-rails-doesnt/146320)

<div class="topic-metadata">

**Author:** [@rsl](https://www.ruby-forum.com/u/rsl)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/rspec-raising-routing-errors-where-rails-doesnt/146320 "2008-08-20T15:35:00Z")

</div>

Hopefully someone here can help me figure out why the ERB: \<% form\_for(@fund, :url =\> {:host =\> PRIVATE\_HOST}, :html =\> {:class =\> ‘fund’, :multipart =\> true}) do |f| %\> raises an error in my specs: No route matches …

---

## [Story Runner Example with Watir](https://www.ruby-forum.com/t/story-runner-example-with-watir/146384)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/story-runner-example-with-watir/146384 "2008-08-20T15:14:16Z")

</div>

Lies here gem install watir http://wiki.openqa.org/display/WTR/Example+Frameworks I will need to port this to Cucumber Feedback Welcome. Aidy

---

## [Any news on the rSpec books?](https://www.ruby-forum.com/t/any-news-on-the-rspec-books/136567)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 9\
**Last updated:** [August 20, 2008, 12:23am UTC](https://www.ruby-forum.com/t/any-news-on-the-rspec-books/136567 "2008-08-20T00:23:28Z")

</div>

I admit it, when it comes to rSpec, I’m lazy. I’ve made a few feeble attempts to use it, but for once I’m waiting for a book-length treatment. At least two books were announced, I think. Can anyone in the know please …

---

## [Failing before :all doesn't move progress bar in html reports](https://www.ruby-forum.com/t/failing-before-all-doesnt-move-progress-bar-in-html-reports/146317)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 12:15am UTC](https://www.ruby-forum.com/t/failing-before-all-doesnt-move-progress-bar-in-html-reports/146317 "2008-08-20T00:15:50Z")

</div>

Hello. I’ve found one bug when failing before :all block doesn’t move html report’s progress bar correctly. You can test it out easily by doing something like this: describe “bad bad bad” do before :all do true.sh…

---

## [When to mock](https://www.ruby-forum.com/t/when-to-mock/146261)

<div class="topic-metadata">

**Author:** [@Jonathan\_Kinney](https://www.ruby-forum.com/u/Jonathan_Kinney)\
**Replies:** 4\
**Last updated:** [August 19, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/when-to-mock/146261 "2008-08-19T16:25:05Z")

</div>

I noticed that the examples on the rspec website for model code http://rspec.info/documentation/rails/writing/models.html have no mocks or stubs. However both the controller example and view example do have mocks an…

---

## [Parameters and View Specs](https://www.ruby-forum.com/t/parameters-and-view-specs/146249)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 1\
**Last updated:** [August 19, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/parameters-and-view-specs/146249 "2008-08-19T13:23:33Z")

</div>

Sigh. Sorry to ask such a dumb question, but I’ve hit one of those walls… I’m testing a view which uses the params\[\] hash directly. (Aside: is this bad form?) How the heckers do I set up the params hash in my test? I…

---

## [Proper Encapsulation of SQL WHERE / ORDER BY Clauses](https://www.ruby-forum.com/t/proper-encapsulation-of-sql-where-order-by-clauses/145949)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 7\
**Last updated:** [August 19, 2008, 8:58am UTC](https://www.ruby-forum.com/t/proper-encapsulation-of-sql-where-order-by-clauses/145949 "2008-08-19T08:58:20Z")

</div>

Hi TDD Fans, I’m pretty new to Ruby / RSpec / Rails but not to TDD. This is more of a general ‘how do you do good design in a rails app’ question than an rspec-specific question. I’m asking it here because I know thi…

---

## [Do you remember RSpactor?](https://www.ruby-forum.com/t/do-you-remember-rspactor/144936)

<div class="topic-metadata">

**Author:** [@awarberg](https://www.ruby-forum.com/u/awarberg)\
**Replies:** 7\
**Last updated:** [August 18, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/do-you-remember-rspactor/144936 "2008-08-18T20:54:55Z")

</div>

It took me a while to get the next release out, but I finally managed to release RSpactor 0.9.16, a Mac OS X RSpec runner. There are no new features but RSpactor should be a lot more stable and responsive now. If you …

---

## [Argument Constraints where the Argument is a Hash](https://www.ruby-forum.com/t/argument-constraints-where-the-argument-is-a-hash/146169)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [August 18, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/argument-constraints-where-the-argument-is-a-hash/146169 "2008-08-18T18:24:43Z")

</div>

Hi folks, I have an object whose constructor I want to stub, specifying that it should be passed a hash containing an expected set of key / value pairs. Note that the actual hash might contain more key / value pairs, …

---

## [Rspec book](https://www.ruby-forum.com/t/rspec-book/140583)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 3\
**Last updated:** [August 18, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/rspec-book/140583 "2008-08-18T16:57:08Z")

</div>

I know that David C. and Aslak HellesÃ¸y were writing a book about rspec for the pragmatic programmers. And I hoped it would be available as a beta book. will it be? David or Aslak, I would like if you can tell us som…

---

## [Autotest and subclasses / namespaces](https://www.ruby-forum.com/t/autotest-and-subclasses-namespaces/145956)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 7\
**Last updated:** [August 18, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/autotest-and-subclasses-namespaces/145956 "2008-08-18T15:43:46Z")

</div>

I am writing a controller admin/cities\_controller.rb it inherits from AdminController, so it’s defined like class Admin::CitiesController \> AdminController Whenever I save the controller file, autotest freaks out: un…

---

## [\[bug\] mock expectations fail when a subclass is instantiated](https://www.ruby-forum.com/t/bug-mock-expectations-fail-when-a-subclass-is-instantiated/146059)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 1\
**Last updated:** [August 17, 2008, 12:51am UTC](https://www.ruby-forum.com/t/bug-mock-expectations-fail-when-a-subclass-is-instantiated/146059 "2008-08-17T00:51:56Z")

</div>

I took a look at the web site but did not see any issue/bug tracker, so I’m reporting this here. The mock framework fails to differentiate between messages sent to a parent class versus a subclass, so some of my expec…

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

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