# RSpec

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

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

---

## [Testing javascript-heavy websites](https://www.ruby-forum.com/t/testing-javascript-heavy-websites/158420)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 4\
**Last updated:** [January 23, 2009, 4:34am UTC](https://www.ruby-forum.com/t/testing-javascript-heavy-websites/158420 "2009-01-23T04:34:26Z")

</div>

We’re starting to work on some javascript-heavy websites, and even some flash/flex based ones as well. What’s the current hotness in automatically testing those types of websites? Does cucumber hook up to selenium no…

---

## [\[Cucumber\] Directory Layout](https://www.ruby-forum.com/t/cucumber-directory-layout/158407)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 3\
**Last updated:** [January 23, 2009, 2:08am UTC](https://www.ruby-forum.com/t/cucumber-directory-layout/158407 "2009-01-23T02:08:10Z")

</div>

I had a relatively flat layout and wanted to group like features together so I made it more hierarchical: features/ messaging/ main\_screen.feature message\_page.feature steps/ main\_screen.rb messaging\_steps.rb Th…

---

## [How best to write repetitive specs](https://www.ruby-forum.com/t/how-best-to-write-repetitive-specs/158356)

<div class="topic-metadata">

**Author:** [@zaczheng](https://www.ruby-forum.com/u/zaczheng)\
**Replies:** 3\
**Last updated:** [January 22, 2009, 2:05pm UTC](https://www.ruby-forum.com/t/how-best-to-write-repetitive-specs/158356 "2009-01-22T14:05:25Z")

</div>

I wanted to test that my mailer models all had the correct headers: subject, to and from fields. I had done this by creating this in my spec\_helper.rb: module TestMailerHelpers module ClassMethods def test\_basic\_hea…

---

## [\[cucumber\] Features with multiple user iterations Â¿?](https://www.ruby-forum.com/t/cucumber-features-with-multiple-user-iterations-a/158271)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 9\
**Last updated:** [January 22, 2009, 1:09pm UTC](https://www.ruby-forum.com/t/cucumber-features-with-multiple-user-iterations-a/158271 "2009-01-22T13:09:29Z")

</div>

I am specing a feature, maybe at more high level of what it should be, and this makes scenarios that involves more that one rails controller. Is it possible or convenient? I have scenarios like this (although it’s onl…

---

## ['Then' after a 'When' and then a 'Then'?](https://www.ruby-forum.com/t/then-after-a-when-and-then-a-then/158274)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 1\
**Last updated:** [January 21, 2009, 3:44pm UTC](https://www.ruby-forum.com/t/then-after-a-when-and-then-a-then/158274 "2009-01-21T15:44:50Z")

</div>

Hi, Is it bad form to use a ‘Then’ after a ‘When’ and then a ‘Then’? When the CiP ingest checkbox is clicked Then ‘1 Spool(s) in Cart’ should appear When the Add button is clicked Then an ingest user is on the BBC C…

---

## [\[RSpec\] Message expectations and #dup / #clone](https://www.ruby-forum.com/t/rspec-message-expectations-and-dup-clone/158166)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 0\
**Last updated:** [January 20, 2009, 12:02am UTC](https://www.ruby-forum.com/t/rspec-message-expectations-and-dup-clone/158166 "2009-01-20T00:02:44Z")

</div>

Can anyone confirm that message expectations are not copied/duplicated to the new object when using Object#dup or #clone ? Thanks! Nick

---

## [\[Cucumber\] code stats](https://www.ruby-forum.com/t/cucumber-code-stats/158153)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 11:51pm UTC](https://www.ruby-forum.com/t/cucumber-code-stats/158153 "2009-01-19T23:51:35Z")

</div>

Rspec provides a stats task for rake. However, it does not reference cucumber step definitions, possibly because these are not easily categorized into the MVC etc. test classifications that the rspec task uses. Is e…

---

## [Cucumber Scenario Outlines Output Insufficient](https://www.ruby-forum.com/t/cucumber-scenario-outlines-output-insufficient/157975)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 10\
**Last updated:** [January 19, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/cucumber-scenario-outlines-output-insufficient/157975 "2009-01-19T23:15:47Z")

</div>

I’m having problems knowing what a scenario outline I’ve created is doing. In particular I have no idea about what steps are being matched when the outline is run so when I break something I can’t find out what is wro…

---

## [Rake features:rcov question](https://www.ruby-forum.com/t/rake-features-rcov-question/158132)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 9:48pm UTC](https://www.ruby-forum.com/t/rake-features-rcov-question/158132 "2009-01-19T21:48:20Z")

</div>

I have reached a point where I thought that it might be useful to see how must test coverage I have for the code I have written. However, running rake features:rcov produces some unexpected output. I see this in the…

---

## [Gem installation issues](https://www.ruby-forum.com/t/gem-installation-issues/158154)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/gem-installation-issues/158154 "2009-01-19T21:39:29Z")

</div>

I’m getting the following error when trying to install rspec: scott-taylors-macbook-pro:dl\_forms(specs) smt$ sudo gem install rspec Password: ERROR: Error installing rspec: invalid gem format for /usr/local/ruby\_ve…

---

## [\[RSpec\] matcher for href](https://www.ruby-forum.com/t/rspec-matcher-for-href/158145)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [January 19, 2009, 9:36pm UTC](https://www.ruby-forum.com/t/rspec-matcher-for-href/158145 "2009-01-19T21:36:33Z")

</div>

Of the several ways available to test for this, what would be the preferred way to see if the following is present in an html document WITHOUT actually following the link? I tried this: response.body.should have\_t…

---

## [\[Rails, RSpec\] The config.gem rake task chicken and egg thing](https://www.ruby-forum.com/t/rails-rspec-the-config-gem-rake-task-chicken-and-egg-thing/158147)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 9:23pm UTC](https://www.ruby-forum.com/t/rails-rspec-the-config-gem-rake-task-chicken-and-egg-thing/158147 "2009-01-19T21:23:36Z")

</div>

Sorry folks, because I know this has been asked before but I don’t remember anyone giving enough detail for me to sort this out the way I want to. How do I change my rake tasks to silently fail if they can’t require …

---

## [\[Cucumber, Webrat\] I should see behaves strangely with html](https://www.ruby-forum.com/t/cucumber-webrat-i-should-see-behaves-strangely-with-html/158067)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 4\
**Last updated:** [January 19, 2009, 7:19pm UTC](https://www.ruby-forum.com/t/cucumber-webrat-i-should-see-behaves-strangely-with-html/158067 "2009-01-19T19:19:21Z")

</div>

Hi, In my tests, I check to see if a given html tag such as ... has the expected value, sometimes it works sometimes it tells me it couldn't find the string, although I see it printed out in the error screen. I think i…

---

## [\[Cucumber, Documentation\]](https://www.ruby-forum.com/t/cucumber-documentation/158129)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/cucumber-documentation/158129 "2009-01-19T16:24:39Z")

</div>

Forgive me if this was already mentioned. While we’re moving doco around on the cucumber wiki, one thing that should change is the name of: http://wiki.github.com/aslakhellesoy/cucumber/using-fit-tables-in-a-feature W…

---

## [\[Cucumber\] CukeTV](https://www.ruby-forum.com/t/cucumber-cuketv/158081)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 7:40am UTC](https://www.ruby-forum.com/t/cucumber-cuketv/158081 "2009-01-19T07:40:20Z")

</div>

Dave Hoover just published a screencast, so I decided to make my own TV channel. It’s called CukeTV, and the whole program is up on http://cukes.info/ It has one episode. Enjoy! Aslak (::slight\_smile:

---

## [Cucumber rake file question](https://www.ruby-forum.com/t/cucumber-rake-file-question/157805)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 5\
**Last updated:** [January 19, 2009, 3:41am UTC](https://www.ruby-forum.com/t/cucumber-rake-file-question/157805 "2009-01-19T03:41:40Z")

</div>

Real beginner question here. I don’t really know rake, so I’m stumbling. As I set a dir to hold my feature files, etc., I’m simply copying the files structure I see in /usr/lib/ruby/gems/1.8/gems/cucumber-0.1.13/examp…

---

## [\[ANN\] Cucumber 0.1.16](https://www.ruby-forum.com/t/ann-cucumber-0-1-16/158072)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 2:18am UTC](https://www.ruby-forum.com/t/ann-cucumber-0-1-16/158072 "2009-01-19T02:18:36Z")

</div>

Cucumber 0.1.16 is out. This is a small bugfix release that should make all the Webrat woes go away for Cucumber/Rails users. After you upgrade your gems to Cucumber 0.1.16 and Webrat 0.4.0 - remember to change the…

---

## [Time for seperate cucumber mailing list?](https://www.ruby-forum.com/t/time-for-seperate-cucumber-mailing-list/157974)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 15\
**Last updated:** [January 19, 2009, 1:21am UTC](https://www.ruby-forum.com/t/time-for-seperate-cucumber-mailing-list/157974 "2009-01-19T01:21:17Z")

</div>

Because traffic is increasing Because cucumber really is a seperate mature topic now. Because rspec overlap is getting smaller (relatively) WDYT Andrew

---

## [App can't start on production server due to RSpec missing](https://www.ruby-forum.com/t/app-cant-start-on-production-server-due-to-rspec-missing/157948)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 18\
**Last updated:** [January 19, 2009, 1:11am UTC](https://www.ruby-forum.com/t/app-cant-start-on-production-server-due-to-rspec-missing/157948 "2009-01-19T01:11:20Z")

</div>

Hi, I just run in the following problem when starting a Rails app on my production server: You have rspec rake tasks installed in /home/thomas/rails\_apps/video\_on\_demand/lib/tasks/rspec.rake, but rspec can not be fo…

---

## [Cucumber dying on decrement\_open\_transactions](https://www.ruby-forum.com/t/cucumber-dying-on-decrement-open-transactions/158052)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 3\
**Last updated:** [January 18, 2009, 9:20pm UTC](https://www.ruby-forum.com/t/cucumber-dying-on-decrement-open-transactions/158052 "2009-01-18T21:20:44Z")

</div>

I am trying to convert from Story Runner to Cucumber so have started with a really minimal story, but am dying with exceptions in ActiveRecord’s decrement\_open\_transactions method. I started took my shortest story and…

---

## [Driving rspec from a Ruby script](https://www.ruby-forum.com/t/driving-rspec-from-a-ruby-script/157936)

<div class="topic-metadata">

**Author:** [@eddyhkim](https://www.ruby-forum.com/u/eddyhkim)\
**Replies:** 7\
**Last updated:** [January 18, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/driving-rspec-from-a-ruby-script/157936 "2009-01-18T19:42:42Z")

</div>

I have very little experience with Ruby. I am using RSpec to test a cross platform C++ library. I am using a shell script (and batch file) to run the tests with several different compilers. I do no want to put the det…

---

## [Do people write specs for the code in their steps? How?](https://www.ruby-forum.com/t/do-people-write-specs-for-the-code-in-their-steps-how/156565)

<div class="topic-metadata">

**Author:** [@erik](https://www.ruby-forum.com/u/erik)\
**Replies:** 5\
**Last updated:** [January 18, 2009, 3:00pm UTC](https://www.ruby-forum.com/t/do-people-write-specs-for-the-code-in-their-steps-how/156565 "2009-01-18T15:00:02Z")

</div>

The approach I like to take is to follow the guidance of the system (cucumber + rspec) every step of the way. Right now there are no passing steps, so I’d write the code for the 1st pending step, run the features and…

---

## [\[Cucumber\] Struggling with "multiple step definitions"](https://www.ruby-forum.com/t/cucumber-struggling-with-multiple-step-definitions/158017)

<div class="topic-metadata">

**Author:** [@bartz](https://www.ruby-forum.com/u/bartz)\
**Replies:** 3\
**Last updated:** [January 18, 2009, 1:17pm UTC](https://www.ruby-forum.com/t/cucumber-struggling-with-multiple-step-definitions/158017 "2009-01-18T13:17:20Z")

</div>

Hey gang, I find myself struggling with multiple step definitions in cucumber all the time. I regularly test the contents of my flash\[:notice\] in steps, since I think that’s part of the behaviour of the app. So, whil…

---

## [\[OT\] please prefix your subject lines](https://www.ruby-forum.com/t/ot-please-prefix-your-subject-lines/158006)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 4\
**Last updated:** [January 18, 2009, 9:34am UTC](https://www.ruby-forum.com/t/ot-please-prefix-your-subject-lines/158006 "2009-01-18T09:34:02Z")

</div>

Hi all, Our list has grown to encompass a variety of broad subjects, and it would help people to improve their own personal signal-to-noise ratios if we all started prefixing our subject lines. The excerpt below was …

---

## [Testing arbitrary post action parameters](https://www.ruby-forum.com/t/testing-arbitrary-post-action-parameters/157938)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 16\
**Last updated:** [January 18, 2009, 9:32am UTC](https://www.ruby-forum.com/t/testing-arbitrary-post-action-parameters/157938 "2009-01-18T09:32:16Z")

</div>

I am working on our (newly renamed) authentication feature. The current scenario is: Scenario: Non-administrators should not set administrator ability Given I have no users And I add a user named “admin” as an admin…

---

## [Putting shared specs in a separate file](https://www.ruby-forum.com/t/putting-shared-specs-in-a-separate-file/158010)

<div class="topic-metadata">

**Author:** [@LesFreeman](https://www.ruby-forum.com/u/LesFreeman)\
**Replies:** 7\
**Last updated:** [January 18, 2009, 4:06am UTC](https://www.ruby-forum.com/t/putting-shared-specs-in-a-separate-file/158010 "2009-01-18T04:06:38Z")

</div>

Hello, I am trying to move shared specs out of my spec\_helper and into separate files. I found an article about the process here:http:// blog.kineticweb.com/articles/2008/04/15/automagical-rspec-shared- example-loadi…

---

## [Vendoring rspec 1.1.12 as a gem](https://www.ruby-forum.com/t/vendoring-rspec-1-1-12-as-a-gem/158008)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 4\
**Last updated:** [January 18, 2009, 2:31am UTC](https://www.ruby-forum.com/t/vendoring-rspec-1-1-12-as-a-gem/158008 "2009-01-18T02:31:13Z")

</div>

Hi folks, Up until now I’ve always used RSpec as a plug-in in my vendor dir, but seeing as the gem is the endorsed way to install I decided I would try the gem this time (still vendoring it though because I vendor ev…

---

## [\[Cucumber, Webrat\] Unable to run 2 features in a row](https://www.ruby-forum.com/t/cucumber-webrat-unable-to-run-2-features-in-a-row/158016)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 2\
**Last updated:** [January 18, 2009, 2:05am UTC](https://www.ruby-forum.com/t/cucumber-webrat-unable-to-run-2-features-in-a-row/158016 "2009-01-18T02:05:26Z")

</div>

Hi, I have written 2 features that each have 1 scenario. When I execute each feature separately with “rake features FEATURE=features/…” they each pass, but when I do “rake features”, the first feature passes, and the …

---

## [Newbie: errors getting started with cucumber](https://www.ruby-forum.com/t/newbie-errors-getting-started-with-cucumber/156127)

<div class="topic-metadata">

**Author:** [@sackerson](https://www.ruby-forum.com/u/sackerson)\
**Replies:** 9\
**Last updated:** [January 17, 2009, 6:21am UTC](https://www.ruby-forum.com/t/newbie-errors-getting-started-with-cucumber/156127 "2009-01-17T06:21:18Z")

</div>

Just getting started with Ruby and Rails, I wanted to check out BDD and cucumber seemed like a good place to start. Let me know if this stuff is too new for a newbie and I’ll wander off. I’ve installed the following: …

---

## [Weird progress bar failure on unrelated spec](https://www.ruby-forum.com/t/weird-progress-bar-failure-on-unrelated-spec/157958)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 1\
**Last updated:** [January 16, 2009, 11:59pm UTC](https://www.ruby-forum.com/t/weird-progress-bar-failure-on-unrelated-spec/157958 "2009-01-16T23:59:21Z")

</div>

Hi Before I try to recreate this, does anyone know what generally causes this in a progress spec run? …/opt/local/lib/ruby/gems/1.8/gems/ rspec-1.1.12/lib/spec/runner/formatter/progress\_bar\_formatter.rb:25:in flush'…

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

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