# RSpec

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

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

---

## [Rspec on javascript links](https://www.ruby-forum.com/t/rspec-on-javascript-links/148863)

<div class="topic-metadata">

**Author:** [@jsamildanach](https://www.ruby-forum.com/u/jsamildanach)\
**Replies:** 1\
**Last updated:** [September 17, 2008, 10:55pm UTC](https://www.ruby-forum.com/t/rspec-on-javascript-links/148863 "2008-09-17T22:55:27Z")

</div>

I have a lot of AJAX calls that make new divs or update information on the page. Is there anyway to test and if the right infomation has been received or displayed after an onclick action? If that makes sense?.. Vie…

---

## [Failing in TextMate but not in rake](https://www.ruby-forum.com/t/failing-in-textmate-but-not-in-rake/148866)

<div class="topic-metadata">

**Author:** [@ed\_ruder](https://www.ruby-forum.com/u/ed_ruder)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/failing-in-textmate-but-not-in-rake/148866 "2008-09-17T20:46:20Z")

</div>

When I run a spec file from TextMate using the RSpec bundle’s “Run Examples” command (either using command-R or the bundle menu item with the spec file open), I get an error dialog with the following text: “Missing th…

---

## [How to count failed and passed examples in one Example Group?](https://www.ruby-forum.com/t/how-to-count-failed-and-passed-examples-in-one-example-group/148862)

<div class="topic-metadata">

**Author:** [@al3kc](https://www.ruby-forum.com/u/al3kc)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/how-to-count-failed-and-passed-examples-in-one-example-group/148862 "2008-09-17T20:46:20Z")

</div>

Hi all, Is it possible to count failed and passed examples in ONE Example Group? Thanks,

---

## [How to count examples in one example group](https://www.ruby-forum.com/t/how-to-count-examples-in-one-example-group/148861)

<div class="topic-metadata">

**Author:** [@al3kc](https://www.ruby-forum.com/u/al3kc)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/how-to-count-examples-in-one-example-group/148861 "2008-09-17T20:45:45Z")

</div>

Hi all, Is it possible to count how many Examples failed and passed in one Example Group? I need to generate report only with Example Group name and numbers of failed and passed examples forn each Example Group. Tha…

---

## [Cucumber and openid](https://www.ruby-forum.com/t/cucumber-and-openid/147440)

<div class="topic-metadata">

**Author:** [@Priit\_T](https://www.ruby-forum.com/u/Priit_T)\
**Replies:** 3\
**Last updated:** [September 17, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/cucumber-and-openid/147440 "2008-09-17T20:17:57Z")

</div>

Hi! I’m new to Cucumber/Story Runner, but not so new to Rspec in general. I googled a lot before posting :slight\_smile: I would like to mock openid consumer however I’m running out of ideas how to access session. I…

---

## [How to write a step for a feature with a select control](https://www.ruby-forum.com/t/how-to-write-a-step-for-a-feature-with-a-select-control/148701)

<div class="topic-metadata">

**Author:** [@djanowski](https://www.ruby-forum.com/u/djanowski)\
**Replies:** 11\
**Last updated:** [September 17, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/how-to-write-a-step-for-a-feature-with-a-select-control/148701 "2008-09-17T14:10:37Z")

</div>

I was wondering what the correct procedure would be for spec’ing the following story line When I pick “My Option” from “My Field” “My Field” would be an Article Category select control, when running my feature the co…

---

## [Autospec is not picking latest changes](https://www.ruby-forum.com/t/autospec-is-not-picking-latest-changes/148769)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 10\
**Last updated:** [September 17, 2008, 9:55am UTC](https://www.ruby-forum.com/t/autospec-is-not-picking-latest-changes/148769 "2008-09-17T09:55:03Z")

</div>

Hey Guys. I just updated a project form 1.1.4 that was working with autotest 3.10 without issues: Updated spec/model/project\_spec.rb and it fired only that spec. Updated app/model/project.rb and it fired only the mat…

---

## [Cucumber: pending specs](https://www.ruby-forum.com/t/cucumber-pending-specs/148784)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 4\
**Last updated:** [September 17, 2008, 9:38am UTC](https://www.ruby-forum.com/t/cucumber-pending-specs/148784 "2008-09-17T09:38:03Z")

</div>

Shouldn’t pending ‘a message’ work in cucumber? Is this a bug? Currently it’s raising Rspec’s PendingExpectationError. SCott

---

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

<div class="topic-metadata">

**Author:** [@bluestar](https://www.ruby-forum.com/u/bluestar)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 3:56am UTC](https://www.ruby-forum.com/t/help/148786 "2008-09-17T03:56:13Z")

</div>

Sent from my iPhone.

---

## [Cucumber - Ambiguous steps](https://www.ruby-forum.com/t/cucumber-ambiguous-steps/148537)

<div class="topic-metadata">

**Author:** [@djanowski](https://www.ruby-forum.com/u/djanowski)\
**Replies:** 21\
**Last updated:** [September 17, 2008, 1:02am UTC](https://www.ruby-forum.com/t/cucumber-ambiguous-steps/148537 "2008-09-17T01:02:27Z")

</div>

I know that cucumber does not allow ambiguous steps to stop duplication of specs, but I ran into the problem of only being a ble to use the following step name once in the whole project Then /I should see “(.\*)” do |t…

---

## [Mocking a 3rd party call, but with a few exceptions](https://www.ruby-forum.com/t/mocking-a-3rd-party-call-but-with-a-few-exceptions/147844)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 2\
**Last updated:** [September 16, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/mocking-a-3rd-party-call-but-with-a-few-exceptions/147844 "2008-09-16T23:05:56Z")

</div>

I use geocoding in our app, and it permeates most of the core functionality. Because it makes a call out to Google or Yahoo or what not to do the geocoding, I’d like to mock this for the bulk of my tests, except for …

---

## [Factoring out code that creates specs](https://www.ruby-forum.com/t/factoring-out-code-that-creates-specs/148631)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [September 16, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/factoring-out-code-that-creates-specs/148631 "2008-09-16T23:05:56Z")

</div>

It’s all gone a bit meta. I’ve started noticing patterns in my specs, where I want more than one class to satisfy a specific bunch of behaviours. I know I can use it\_should\_behave\_like and this works in simple cases,…

---

## [W3 validation](https://www.ruby-forum.com/t/w3-validation/148656)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 3\
**Last updated:** [September 16, 2008, 6:39pm UTC](https://www.ruby-forum.com/t/w3-validation/148656 "2008-09-16T18:39:40Z")

</div>

Hi, suggestions how to add w3 validation to a story step? eg Then the page should be valid tia linoj

---

## [Runner does not pick steps. help please](https://www.ruby-forum.com/t/runner-does-not-pick-steps-help-please/148685)

<div class="topic-metadata">

**Author:** [@nubeerails](https://www.ruby-forum.com/u/nubeerails)\
**Replies:** 4\
**Last updated:** [September 16, 2008, 6:22pm UTC](https://www.ruby-forum.com/t/runner-does-not-pick-steps-help-please/148685 "2008-09-16T18:22:33Z")

</div>

Please help me to understand why runner is not picking steps. http://pastie.org/273126

---

## [Helpers that call helpers not working in specs?](https://www.ruby-forum.com/t/helpers-that-call-helpers-not-working-in-specs/148632)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 4\
**Last updated:** [September 16, 2008, 6:27am UTC](https://www.ruby-forum.com/t/helpers-that-call-helpers-not-working-in-specs/148632 "2008-09-16T06:27:51Z")

</div>

I’m trying to test some of my helpers. I have one helper (in module LocationsHelper) that calls a helper/method in ApplicationHelper. If I include ApplicationHelper and LocationHelper in my spec, and then I call the …

---

## [Mocking the dynamic composition of named\_scopes](https://www.ruby-forum.com/t/mocking-the-dynamic-composition-of-named-scopes/148485)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 2\
**Last updated:** [September 14, 2008, 8:21am UTC](https://www.ruby-forum.com/t/mocking-the-dynamic-composition-of-named-scopes/148485 "2008-09-14T08:21:00Z")

</div>

Hello I am still learning to specify named\_scopes, having some troubles and needing some help. This is the situation. I have already spec two or three named\_scopes independently. but now, I want to spec a function t…

---

## [Rake does recognize "rake examples\_with\_rcov"](https://www.ruby-forum.com/t/rake-does-recognize-rake-examples-with-rcov/148491)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [September 14, 2008, 5:58am UTC](https://www.ruby-forum.com/t/rake-does-recognize-rake-examples-with-rcov/148491 "2008-09-14T05:58:17Z")

</div>

Hi, Q1 - Know why rake doesn’t recognize “rake examples\_with\_rcov” per http://rspec.info/documentation/tools/rcov.html ? Q2 - Also when I run “rake spec:rcov” it seems to give me the same as if I just run “autotest” …

---

## [RSpec story failing because create is not rendering 'show'](https://www.ruby-forum.com/t/rspec-story-failing-because-create-is-not-rendering-show/148408)

<div class="topic-metadata">

**Author:** [@djanowski](https://www.ruby-forum.com/u/djanowski)\
**Replies:** 13\
**Last updated:** [September 13, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/rspec-story-failing-because-create-is-not-rendering-show/148408 "2008-09-13T21:51:11Z")

</div>

This is my story: require File.expand\_path(File.dirname(FILE) + “/helper”) Story “Creating a Product”, %{ As a User I want to create a product So that I can collect purchase options together under a specific produc…

---

## [RCov / RSpec segfaults on Ubuntu](https://www.ruby-forum.com/t/rcov-rspec-segfaults-on-ubuntu/148488)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 3\
**Last updated:** [September 13, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/rcov-rspec-segfaults-on-ubuntu/148488 "2008-09-13T18:58:31Z")

</div>

Hi all, I appreciate that this is not an RSpec question, but I wondered if anyone out there can offer some pointers. We’re using the latest versions of RSpec and RCov, and ruby --version says this (on the Ubuntu buil…

---

## [Mocking the shell command (Kernel module)](https://www.ruby-forum.com/t/mocking-the-shell-command-kernel-module/148407)

<div class="topic-metadata">

**Author:** [@Joaquin\_Rivera\_P](https://www.ruby-forum.com/u/Joaquin_Rivera_P)\
**Replies:** 8\
**Last updated:** [September 13, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/mocking-the-shell-command-kernel-module/148407 "2008-09-13T18:15:46Z")

</div>

hello there, what is the best (or any) way of mocking the running of shell commands? e.g. code like the following: %{ ls } spec: it “should list the directory contents” shell = mock(Object) # %{} lives in Kernel m…

---

## [Form\_for url](https://www.ruby-forum.com/t/form-for-url/148475)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 0\
**Last updated:** [September 13, 2008, 6:38am UTC](https://www.ruby-forum.com/t/form-for-url/148475 "2008-09-13T06:38:37Z")

</div>

hi, I’m specing a view that contains \<% form\_for @page, :url =\> { :action =\> :update },… and get the error No route matches {:action=\>“update”} In the spec, I’ve tried several things, including it “should work” do …

---

## [Growl notifications don't work each time?](https://www.ruby-forum.com/t/growl-notifications-dont-work-each-time/148366)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [September 13, 2008, 5:35am UTC](https://www.ruby-forum.com/t/growl-notifications-dont-work-each-time/148366 "2008-09-13T05:35:55Z")

</div>

Hi - has anyone had problems with Growl notifications not working each time? I can hit save on a test, wait, check. Then hit save again, wait, check. Sometimes the growl notification doesn’t work. I’m using ZenTest…

---

## [Cucumber setup and teardown](https://www.ruby-forum.com/t/cucumber-setup-and-teardown/148460)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 0\
**Last updated:** [September 13, 2008, 1:38am UTC](https://www.ruby-forum.com/t/cucumber-setup-and-teardown/148460 "2008-09-13T01:38:21Z")

</div>

Hi all, I added a section to Cucumber’s wiki about converting StoryListeners into Cucumber’s API. Since I’m still learning my self I’d appreciate it if someone could look at what I wrote and make sure I didn’t miss …

---

## [Cucumber gem install](https://www.ruby-forum.com/t/cucumber-gem-install/148393)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 5\
**Last updated:** [September 12, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/cucumber-gem-install/148393 "2008-09-12T23:37:17Z")

</div>

Hi, I am having problem with the cucumber gem install gem sources --add http://gems.github.com/ gem install aslakhellesoy-cucumber =\> C:\>gem install aslakhellesoy-cucumber ERROR: While executing gem … (Errno::ENOE…

---

## [RSpec in Rails -- HTTP methods](https://www.ruby-forum.com/t/rspec-in-rails-http-methods/148232)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 6\
**Last updated:** [September 12, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/rspec-in-rails-http-methods/148232 "2008-09-12T19:26:16Z")

</div>

It seems that RSpec-Rails isn’t restricted to the HTTP methods correctly. For example doing: http://foo.local/session/destroy in the browser doesn’t work, because the destroy action is only recognised with the HTTP …

---

## [Booting rails routing without a controller call](https://www.ruby-forum.com/t/booting-rails-routing-without-a-controller-call/148423)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [September 12, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/booting-rails-routing-without-a-controller-call/148423 "2008-09-12T18:23:01Z")

</div>

We’re getting into some quite complex routing, and I’d like to be able to spec the routing on its own. All our controllers tend to have a little call to like this to boot up the routing before testing params\_from etc: …

---

## [Best practices for sharing state between story steps?](https://www.ruby-forum.com/t/best-practices-for-sharing-state-between-story-steps/147979)

<div class="topic-metadata">

**Author:** [@sams](https://www.ruby-forum.com/u/sams)\
**Replies:** 23\
**Last updated:** [September 11, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/best-practices-for-sharing-state-between-story-steps/147979 "2008-09-11T18:58:13Z")

</div>

Hi all, I’m just getting into RSpec stories and liking them (especially with webrat), but I’m finding it tricky to write steps that are self-contained and reusable, particularly where features intersect. What approac…

---

## [Feature Injection](https://www.ruby-forum.com/t/feature-injection/148274)

<div class="topic-metadata">

**Author:** [@aslak\_hellesoy](https://www.ruby-forum.com/u/aslak_hellesoy)\
**Replies:** 1\
**Last updated:** [September 11, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/feature-injection/148274 "2008-09-11T16:28:49Z")

</div>

Hi - just thought I’d share this great blog post by Liz Keogh with you all: Aslak

---

## [Save stack trace in story runner](https://www.ruby-forum.com/t/save-stack-trace-in-story-runner/148291)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 4\
**Last updated:** [September 11, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/save-stack-trace-in-story-runner/148291 "2008-09-11T13:17:21Z")

</div>

Hi, I am still using story-runner and have not moved over to Cucumber. HTML files are coloured created, however I am unable to save the stack trace when errors occur. What are others doing? Will the move to Cucumber …

---

## [Story steps all became "PENDING" in the update from RSpec 1.1.3 to 1.1.4](https://www.ruby-forum.com/t/story-steps-all-became-pending-in-the-update-from-rspec-1-1-3-to-1-1-4/148196)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 1\
**Last updated:** [September 10, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/story-steps-all-became-pending-in-the-update-from-rspec-1-1-3-to-1-1-4/148196 "2008-09-10T15:08:07Z")

</div>

Hi all, I had some stories which worked fine under RSpec 1.1.3 which are broken under 1.1.4 (suddenly all steps are marked as PENDING, and one of the steps raises a NoMethodError due to an unexpected nil object in th…

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

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