# RSpec

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

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

---

## [Rspecing an enumerator from outside-in woes](https://www.ruby-forum.com/t/rspecing-an-enumerator-from-outside-in-woes/161683)

<div class="topic-metadata">

**Author:** [@Shot\_SPiotr\_S.S](https://www.ruby-forum.com/u/Shot_SPiotr_S.S)\
**Replies:** 8\
**Last updated:** [March 3, 2009, 1:10am UTC](https://www.ruby-forum.com/t/rspecing-an-enumerator-from-outside-in-woes/161683 "2009-03-03T01:10:09Z")

</div>

rspec-users mailing list removed\_email\_address@domain.invalid http://rubyforge.org/mailman/listinfo/rspec-users

---

## [Is there a way to generate spec for existing controllers?](https://www.ruby-forum.com/t/is-there-a-way-to-generate-spec-for-existing-controllers/161746)

<div class="topic-metadata">

**Author:** [@tytyty](https://www.ruby-forum.com/u/tytyty)\
**Replies:** 4\
**Last updated:** [March 3, 2009, 12:43am UTC](https://www.ruby-forum.com/t/is-there-a-way-to-generate-spec-for-existing-controllers/161746 "2009-03-03T00:43:49Z")

</div>

Hi list, We just start using RSpec and rspec\_on\_rails for a existing Rails project. After run script/generate rspec. It only generate the structure folders. We’ve got quite a few controllers and models. I wonder is …

---

## [Cucumber Feature Scenario critique](https://www.ruby-forum.com/t/cucumber-feature-scenario-critique/160893)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 21\
**Last updated:** [March 2, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/cucumber-feature-scenario-critique/160893 "2009-03-02T19:10:12Z")

</div>

When I initially began working with cucumber and developing features and steps from existing code I went through a process (prompted by the members of this group) of developing increasingly abstract (declarative?) wor…

---

## [Feature Size-Scope-Scale](https://www.ruby-forum.com/t/feature-size-scope-scale/161802)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 2\
**Last updated:** [March 2, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/feature-size-scope-scale/161802 "2009-03-02T18:04:41Z")

</div>

The more I work with BDD the more I realize how different this is from my previous experience. I now consider that part of the difficulty I have lies in establishing the proper scale for the features that I propose. …

---

## [How do you mock a local variable?](https://www.ruby-forum.com/t/how-do-you-mock-a-local-variable/161743)

<div class="topic-metadata">

**Author:** [@MathLef](https://www.ruby-forum.com/u/MathLef)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 12:20am UTC](https://www.ruby-forum.com/t/how-do-you-mock-a-local-variable/161743 "2009-03-02T00:20:06Z")

</div>

Hi, I need some help to spec’ a function I am developping. Note that the function is still not complete, cause I am trying to spec’ it while working on it, as it should be ! Basically, this is what my function should…

---

## [\[cucumber\] noob Q deleteing from a list](https://www.ruby-forum.com/t/cucumber-noob-q-deleteing-from-a-list/161445)

<div class="topic-metadata">

**Author:** [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Replies:** 5\
**Last updated:** [March 2, 2009, 12:01am UTC](https://www.ruby-forum.com/t/cucumber-noob-q-deleteing-from-a-list/161445 "2009-03-02T00:01:56Z")

</div>

manage\_froobles.feature Scenario: Delete frooble Given the following froobles: |name|color|description| |name 1|color 1|description 1| |name 2|color 2|description 2| |name 3|color 3|description 3| |name 4|color 4|d…

---

## [New blog for Ruby-based software testers - www.agilerubytester.com](https://www.ruby-forum.com/t/new-blog-for-ruby-based-software-testers-www-agilerubytester-com/161742)

<div class="topic-metadata">

**Author:** [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 12:01am UTC](https://www.ruby-forum.com/t/new-blog-for-ruby-based-software-testers-www-agilerubytester-com/161742 "2009-03-02T00:01:56Z")

</div>

Hi, my name is Jim K… I’m a QA Engineer who works with Ruby and Watir (and RSpec) in the doing of my job (testing web applications). I’ve started a blog on my experiences and lessons learned. It is is at http://agi…

---

## [Starting a program from ruby on windows](https://www.ruby-forum.com/t/starting-a-program-from-ruby-on-windows/161727)

<div class="topic-metadata">

**Author:** [@jbell38](https://www.ruby-forum.com/u/jbell38)\
**Replies:** 0\
**Last updated:** [March 1, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/starting-a-program-from-ruby-on-windows/161727 "2009-03-01T20:18:23Z")

</div>

I simply want to start another program from this GUI and let the GUI continue doing its own thing. The other program will run independent of the GUI and should stay running if the GUI is closed. require ‘fox16’ incl…

---

## [How to get started with cucumber and assert{ 2.0 }](https://www.ruby-forum.com/t/how-to-get-started-with-cucumber-and-assert-2-0/161724)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [March 1, 2009, 6:51pm UTC](https://www.ruby-forum.com/t/how-to-get-started-with-cucumber-and-assert-2-0/161724 "2009-03-01T18:51:18Z")

</div>

\[Warning: The following is not a question\] Cucumberists: One of the irons in my fires is learning a little Cuke. So I try an experiment: Feature: join In order to get premium content As an unregistered member I wa…

---

## [Cucumber ambiguous match](https://www.ruby-forum.com/t/cucumber-ambiguous-match/161679)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 3\
**Last updated:** [March 1, 2009, 7:52am UTC](https://www.ruby-forum.com/t/cucumber-ambiguous-match/161679 "2009-03-01T07:52:16Z")

</div>

Ambiguous match of “a volunteer ‘Joe’ from ‘Cincinnati’”: features/step\_definitions/user\_steps.rb:1:in \`/^a volunteer ‘(.)’$/’ features/step\_definitions/user\_steps.rb:5:in \`/^a volunteer '(.)’ from ‘(.\*)’$/’ Don’…

---

## [\[RSpec\] \[Rails\] \[BDD\]](https://www.ruby-forum.com/t/rspec-rails-bdd/161672)

<div class="topic-metadata">

**Author:** [@julian\_mann](https://www.ruby-forum.com/u/julian_mann)\
**Replies:** 3\
**Last updated:** [March 1, 2009, 3:38am UTC](https://www.ruby-forum.com/t/rspec-rails-bdd/161672 "2009-03-01T03:38:10Z")

</div>

Hello, My first time here, and I’m pretty new to rspec, and indeed BDD/TDD, so bear with me I am trying to spec a fairly simple controller update action for an account. The account belongs\_to :user and user has\_one…

---

## [How do you mock a local variable (#2)?](https://www.ruby-forum.com/t/how-do-you-mock-a-local-variable-2/161617)

<div class="topic-metadata">

**Author:** [@MathLef](https://www.ruby-forum.com/u/MathLef)\
**Replies:** 5\
**Last updated:** [February 28, 2009, 6:06pm UTC](https://www.ruby-forum.com/t/how-do-you-mock-a-local-variable-2/161617 "2009-02-28T18:06:40Z")

</div>

Hi, I need help to spec a local variable in a controller. I have been wandering how I can do that since all I have done so far is useless. Note that the code is in a controller and that it is not yet finished since I…

---

## [Run cucumber on a different DB than test?](https://www.ruby-forum.com/t/run-cucumber-on-a-different-db-than-test/161467)

<div class="topic-metadata">

**Author:** [@Forrest\_C](https://www.ruby-forum.com/u/Forrest_C)\
**Replies:** 9\
**Last updated:** [February 28, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/run-cucumber-on-a-different-db-than-test/161467 "2009-02-28T14:48:08Z")

</div>

Hi all: Is it possible to run Rails Cucumber spec in a different DB than the test DB? I’d like to run the rspec and cucumber tests in parallel in my cc.rb build, and as it is now, I get MYSQL deadlocks on occasion. …

---

## [\[RSpec\]\[RJS\] Problem with specing create.rjs in controller\_spec](https://www.ruby-forum.com/t/rspec-rjs-problem-with-specing-create-rjs-in-controller-spec/161451)

<div class="topic-metadata">

**Author:** [@Evgeny\_Bogdanov](https://www.ruby-forum.com/u/Evgeny_Bogdanov)\
**Replies:** 4\
**Last updated:** [February 27, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/rspec-rjs-problem-with-specing-create-rjs-in-controller-spec/161451 "2009-02-27T19:57:42Z")

</div>

Could somebody please explain me what I am doing wrong. I am trying to spec create.rjs file, that is returned from my controller. render\_template(“create.rjs”) works just fine, however have\_rjs fails with the followi…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/161591)

<div class="topic-metadata">

**Author:** [@Marcus\_R](https://www.ruby-forum.com/u/Marcus_R)\
**Replies:** 11\
**Last updated:** [February 27, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/no-subject/161591 "2009-02-27T18:49:03Z")

</div>

Apologies as this feels like an FAQ, but the only answer I can find refers to a bug in a much earlier version of rspec, and this feels like a common thing to do, so I suspect we’re doing something stupid. The issue se…

---

## [A silent cucumber?](https://www.ruby-forum.com/t/a-silent-cucumber/161475)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [February 27, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/a-silent-cucumber/161475 "2009-02-27T18:03:11Z")

</div>

I believe that what I am trying to do should be possible, but I cannot seem to find the right combination of switches to get cucumber to run silently and only print the failing and pending steps. I do not have a cucu…

---

## [Cucumber status](https://www.ruby-forum.com/t/cucumber-status/161586)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 2\
**Last updated:** [February 27, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/cucumber-status/161586 "2009-02-27T17:43:58Z")

</div>

Just a quick heads up on Cucumber 0.2. It’s taking a little longer than I had thought. Getting the Background feature working while preserving a simple AST and visitor traversal, tag filtering etc opened up a little c…

---

## [\[cucumber\] Adding a file to support/ can break requires ordering](https://www.ruby-forum.com/t/cucumber-adding-a-file-to-support-can-break-requires-ordering/161501)

<div class="topic-metadata">

**Author:** [@randy\_hendriawan](https://www.ruby-forum.com/u/randy_hendriawan)\
**Replies:** 1\
**Last updated:** [February 26, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/cucumber-adding-a-file-to-support-can-break-requires-ordering/161501 "2009-02-26T23:49:20Z")

</div>

Current code in cucumber prioritizes features/support/ files, but if I add another file in that location, then it can (sometimes) include that file first. Seems to depend on the number of files actually in the entire…

---

## [\[Cucumber\] Webrat / Watir - generating page images](https://www.ruby-forum.com/t/cucumber-webrat-watir-generating-page-images/161450)

<div class="topic-metadata">

**Author:** [@arco](https://www.ruby-forum.com/u/arco)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 6:57pm UTC](https://www.ruby-forum.com/t/cucumber-webrat-watir-generating-page-images/161450 "2009-02-26T18:57:51Z")

</div>

I am using Cucumber with Webrat/Watir/Celerity for UI testing. I would like to generate an error report which shows the page image for each failed test. I believe I have read about this being done, but now I can’t fin…

---

## [\[cucumber\] orphaned steps](https://www.ruby-forum.com/t/cucumber-orphaned-steps/161379)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 3\
**Last updated:** [February 26, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/cucumber-orphaned-steps/161379 "2009-02-26T16:11:27Z")

</div>

Any good way to find all orphaned steps? That is, any steps that exist that do not match any features? Many thanks, Tim

---

## [Specing send\_file](https://www.ruby-forum.com/t/specing-send-file/161120)

<div class="topic-metadata">

**Author:** [@vo.x](https://www.ruby-forum.com/u/vo.x)\
**Replies:** 6\
**Last updated:** [February 26, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/specing-send-file/161120 "2009-02-26T15:40:11Z")

</div>

Hello everybody! Im wondering what is the best way of specing action with send file such as: def download log = ActivityLog.find(params\[:id\]) if log send\_file log.path else flash\[:notice\] = \_(“Log file “#{params\[…

---

## [Testing User Agent](https://www.ruby-forum.com/t/testing-user-agent/161302)

<div class="topic-metadata">

**Author:** [@Suprie\_Leonhart](https://www.ruby-forum.com/u/Suprie_Leonhart)\
**Replies:** 8\
**Last updated:** [February 26, 2009, 6:16am UTC](https://www.ruby-forum.com/t/testing-user-agent/161302 "2009-02-26T06:16:04Z")

</div>

hi i’m testing some lib i’ve made for detecting mobile user agent, I confused how to test the lib i’ve made. the test code is describe "Check if mobile browser" do it "should know if it's from blackberry" do …

---

## [RSpec with edge rails (2.3 RC1)](https://www.ruby-forum.com/t/rspec-with-edge-rails-2-3-rc1/161360)

<div class="topic-metadata">

**Author:** [@katrash](https://www.ruby-forum.com/u/katrash)\
**Replies:** 10\
**Last updated:** [February 26, 2009, 3:04am UTC](https://www.ruby-forum.com/t/rspec-with-edge-rails-2-3-rc1/161360 "2009-02-26T03:04:01Z")

</div>

Hi, I’m failing miserably to get RSpec running with edge rails (2.3 RC1). I’ve tried building/installing the 1.1.99.1 gems from David’s git repos (GitHub - dchelimsky/rspec-rails: RSpec extension library for Ruby on R…

---

## [How to mock an object defined in the before\_filter function?](https://www.ruby-forum.com/t/how-to-mock-an-object-defined-in-the-before-filter-function/161118)

<div class="topic-metadata">

**Author:** [@Evgeny\_Bogdanov](https://www.ruby-forum.com/u/Evgeny_Bogdanov)\
**Replies:** 6\
**Last updated:** [February 26, 2009, 2:04am UTC](https://www.ruby-forum.com/t/how-to-mock-an-object-defined-in-the-before-filter-function/161118 "2009-02-26T02:04:50Z")

</div>

Hello, I am trying to implement the following scenario, but I am stuck … The thing is I want to initialize a variable @comment when the stub function “find\_comment” is called. The way I do it below doesn’t work, sinc…

---

## [Wrong number of arguments (2 for 1)](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-for-1/161374)

<div class="topic-metadata">

**Author:** [@hayafirst](https://www.ruby-forum.com/u/hayafirst)\
**Replies:** 4\
**Last updated:** [February 26, 2009, 1:19am UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-for-1/161374 "2009-02-26T01:19:45Z")

</div>

The following statement gave me “wrong number of arguments (2 for 1)” and it is the only error. no stack trace. presenter.stub!(:account).and\_return account any idea? Thanks Yi

---

## [How to properly mock a complex object "comment.initiator.group.name"?](https://www.ruby-forum.com/t/how-to-properly-mock-a-complex-object-comment-initiator-group-name/161314)

<div class="topic-metadata">

**Author:** [@Evgeny\_Bogdanov](https://www.ruby-forum.com/u/Evgeny_Bogdanov)\
**Replies:** 2\
**Last updated:** [February 25, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/how-to-properly-mock-a-complex-object-comment-initiator-group-name/161314 "2009-02-25T23:13:39Z")

</div>

I am wondering what is the best way to mock such expression: “comment.initiator.group.name” What I do now is: comment = mock\_model(Comment) initiator = mock\_model(User) group = mock\_model(Group, :name =\> “Admin”) in…

---

## [\[Cucumber\] pretty html output?](https://www.ruby-forum.com/t/cucumber-pretty-html-output/161338)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 5\
**Last updated:** [February 25, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/cucumber-pretty-html-output/161338 "2009-02-25T22:37:13Z")

</div>

Cucumberists (and RSpec Classic users ;): How can we convert a Cucumber feature file into HTML with syntax highlighting? Not the test-runner output; that’s preprocessed so it does not match the input file… Tx! – …

---

## [Surprised by stub/mock interaction](https://www.ruby-forum.com/t/surprised-by-stub-mock-interaction/161339)

<div class="topic-metadata">

**Author:** [@reversejt](https://www.ruby-forum.com/u/reversejt)\
**Replies:** 3\
**Last updated:** [February 25, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/surprised-by-stub-mock-interaction/161339 "2009-02-25T19:31:04Z")

</div>

Hello, Something I do often is use stub methods in before blocks and mock expectations in a specific examples (much like described here: http://blog.davidchelimsky.net/2006/11/9/tutorial-rspec-stubs-and-mocks). I was…

---

## [\[Cucumber\] Enforce a skip on a non-implemented step](https://www.ruby-forum.com/t/cucumber-enforce-a-skip-on-a-non-implemented-step/161315)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 4\
**Last updated:** [February 25, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/cucumber-enforce-a-skip-on-a-non-implemented-step/161315 "2009-02-25T16:15:23Z")

</div>

Hi, When we create step defintions. For example: When /^that data is loaded$/ do end The above is seen in the Cucucmber run as implemented. Is it possible to put something within this method to enforce a skip flag? …

---

## [\[ANN\] Fixjour mailing list](https://www.ruby-forum.com/t/ann-fixjour-mailing-list/161280)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 0\
**Last updated:** [February 25, 2009, 12:49am UTC](https://www.ruby-forum.com/t/ann-fixjour-mailing-list/161280 "2009-02-25T00:49:13Z")

</div>

Hey, if you’re using Fixjour, you might be interested in its new mailing list - http://groups.google.com/group/fixjour. If you’re not using Fixjour, you should be. Pat

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

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