# RSpec

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

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

---

## [My first tests, backwards. Please help](https://www.ruby-forum.com/t/my-first-tests-backwards-please-help/156611)

<div class="topic-metadata">

**Author:** [@caiwangqin](https://www.ruby-forum.com/u/caiwangqin)\
**Replies:** 14\
**Last updated:** [January 1, 2009, 6:32pm UTC](https://www.ruby-forum.com/t/my-first-tests-backwards-please-help/156611 "2009-01-01T18:32:30Z")

</div>

Hello, I’m trying to get a positive attitude towards testing. I wrote a controller that seems to work, and I want to make some tests. I populated the test db with an auction, some users, an item, and some charities…

---

## [Testing lib code](https://www.ruby-forum.com/t/testing-lib-code/156602)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 4\
**Last updated:** [December 30, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/testing-lib-code/156602 "2008-12-30T21:32:47Z")

</div>

Hello– This question has, I’m sure, been asked and answered hundreds of times, but I was unable to turn up anything in Google. Here’s the issue: I have some code in a Rails app in the lib/ directory that affects how …

---

## [BDD or SDD?](https://www.ruby-forum.com/t/bdd-or-sdd/156598)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 3\
**Last updated:** [December 30, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/bdd-or-sdd/156598 "2008-12-30T20:18:57Z")

</div>

Hi, Is there a difference between Behaviour-Driven-Development and Story-Driven-Development? Is Story-Driven-Development a more accurate description of using Cucumber as a Story Runner? Regards Aidy

---

## [Problem with testing helper](https://www.ruby-forum.com/t/problem-with-testing-helper/156594)

<div class="topic-metadata">

**Author:** [@Ivo\_D](https://www.ruby-forum.com/u/Ivo_D)\
**Replies:** 2\
**Last updated:** [December 30, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/problem-with-testing-helper/156594 "2008-12-30T17:23:47Z")

</div>

Hi I bumped into a problem and tracked it down to this: Form tag helpers in helpers do not seem to be testable. The helper does actually work like it should if used in a view. Example: This helper: ############# d…

---

## [How to check for empty field value?](https://www.ruby-forum.com/t/how-to-check-for-empty-field-value/156563)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 3\
**Last updated:** [December 30, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/how-to-check-for-empty-field-value/156563 "2008-12-30T16:13:19Z")

</div>

Then /^the email\_confirmation field should be cleared$/ do #how to write this ??? #selector( “input\[name=user\[email\_confirmation\]”)\[:value\].should be\_blank end

---

## [Error when mocking a method in a class](https://www.ruby-forum.com/t/error-when-mocking-a-method-in-a-class/156514)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 5\
**Last updated:** [December 30, 2008, 11:24am UTC](https://www.ruby-forum.com/t/error-when-mocking-a-method-in-a-class/156514 "2008-12-30T11:24:47Z")

</div>

I am fighting with an error using rspec-on-rails-matchers. I have a model called “Centro” based in this table create\_table “centros”, :force =\> true do |t| t.string “nombre” t.string “cif” t.string “domicilio” …

---

## [Cucumber/rails tutorial #2](https://www.ruby-forum.com/t/cucumber-rails-tutorial-2/156538)

<div class="topic-metadata">

**Author:** [@sackerson](https://www.ruby-forum.com/u/sackerson)\
**Replies:** 2\
**Last updated:** [December 30, 2008, 2:30am UTC](https://www.ruby-forum.com/t/cucumber-rails-tutorial-2/156538 "2008-12-30T02:30:54Z")

</div>

I thought you all might be interested in my second tutorial: http://www.ultrasaurus.com/code/2008/12/rails-2-day-4-rcov-and-bdd.html It covers more webrat plus a trickier delete scenario, based on a previous thread: S…

---

## [Regex help](https://www.ruby-forum.com/t/regex-help/156497)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 3\
**Last updated:** [December 29, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/regex-help/156497 "2008-12-29T18:55:49Z")

</div>

Hi, Could someone help me resolve this conflict: Then the selected item should have a \<label\> tag with "Foo:" Multiple step definitions match “the selected item should have a tag with “Foo:””: (Cucumber::Multiple) …

---

## [Cucumber fit step table output](https://www.ruby-forum.com/t/cucumber-fit-step-table-output/156479)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 4\
**Last updated:** [December 29, 2008, 3:59pm UTC](https://www.ruby-forum.com/t/cucumber-fit-step-table-output/156479 "2008-12-29T15:59:14Z")

</div>

If this is a bug I’ll submit a ticket. Or, maybe I’d doing something wrong. Using a Cucumber FIT Step Table, the scenario runs and passes (and fails when i put bad data in the table). But the console output only show…

---

## [Cucumber and FireWatir](https://www.ruby-forum.com/t/cucumber-and-firewatir/156486)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 1\
**Last updated:** [December 29, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/cucumber-and-firewatir/156486 "2008-12-29T15:52:42Z")

</div>

Hi, I have exampled Cucumber and FireWatir here: http://code.google.com/p/cucumber-and-watir/ FireWatir will run on Windows, OSX and GNU\\Linux. It is on google-code as I am unfamiliar with git. Regards Aidy

---

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

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 4\
**Last updated:** [December 26, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/cucumber-command/156386 "2008-12-26T12:27:24Z")

</div>

Hello I want to use the cucumber command to run only the feature I am working on now. But I have a structure of folders like this: features/ administracion/ alta\_centros.feature modificacion\_centros.feature step\_…

---

## [Happy Christmas Thread](https://www.ruby-forum.com/t/happy-christmas-thread/156345)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 6\
**Last updated:** [December 26, 2008, 1:18am UTC](https://www.ruby-forum.com/t/happy-christmas-thread/156345 "2008-12-26T01:18:54Z")

</div>

Happy X-MAS all you rspeccers and cucumberists :slight\_smile:

---

## [Nokogiri 1.1.0 and ActiveRecord 2.2.0](https://www.ruby-forum.com/t/nokogiri-1-1-0-and-activerecord-2-2-0/156324)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 5\
**Last updated:** [December 25, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/nokogiri-1-1-0-and-activerecord-2-2-0/156324 "2008-12-25T19:40:40Z")

</div>

Just a heads up. I updated my nokogiri gem to 1.1.0 yesterday and could not run rake features thereafter. I had to drop back to 1.0.7. I have reported this problem on the project page at rubyforge. This is what I se…

---

## [\[ANN\] Cucumber 0.1.13](https://www.ruby-forum.com/t/ann-cucumber-0-1-13/156116)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 3\
**Last updated:** [December 24, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/ann-cucumber-0-1-13/156116 "2008-12-24T14:14:29Z")

</div>

It’s time for some new features again. Output is now much better since you can use diffing, tweak the output colours and get the full --backtrace if you want. Managing your support/\* files became a little easier si…

---

## [Why does "ruby \<spec\_file\>" work, but "rake spec" give spec errors?](https://www.ruby-forum.com/t/why-does-ruby-spec-file-work-but-rake-spec-give-spec-errors/156292)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 6\
**Last updated:** [December 24, 2008, 2:56am UTC](https://www.ruby-forum.com/t/why-does-ruby-spec-file-work-but-rake-spec-give-spec-errors/156292 "2008-12-24T02:56:39Z")

</div>

Hi, Does anyone know why I would have some spec’s failing when using “./script/autospec” or “rake spec”, however when I just run them using “ruby " it passes ok”? What’s the difference in kicking off a spec by th…

---

## [How can I run a spec in DEBUG mode (e.g. like rdebug \<spec\_name\>)](https://www.ruby-forum.com/t/how-can-i-run-a-spec-in-debug-mode-e-g-like-rdebug-spec-name/156293)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [December 24, 2008, 2:44am UTC](https://www.ruby-forum.com/t/how-can-i-run-a-spec-in-debug-mode-e-g-like-rdebug-spec-name/156293 "2008-12-24T02:44:58Z")

</div>

Hi, Is there a way to run a spec in debug mode (using rdebug) so I can use breakpoints in my spec code? I ask this noting I’ve got some differences in specs passing/failing depending on whether I run the spec via "ru…

---

## [\[cucumber\] screenshot upon exception](https://www.ruby-forum.com/t/cucumber-screenshot-upon-exception/156215)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 5\
**Last updated:** [December 24, 2008, 12:59am UTC](https://www.ruby-forum.com/t/cucumber-screenshot-upon-exception/156215 "2008-12-24T00:59:06Z")

</div>

Hi, I am using Cucumber in combination with tests that drive the actual browser. Is there a place where I can easily trap an exception and take a screenshot of the browser? Regards Aidy

---

## [Cucumber: dependencies.rb:266:in \`load\_missing\_constant': uninitialized constant Dispatcher](https://www.ruby-forum.com/t/cucumber-dependencies-rbin-load-missing-constant-uninitialized-constant-dispatcher/156276)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 6\
**Last updated:** [December 23, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/cucumber-dependencies-rbin-load-missing-constant-uninitialized-constant-dispatcher/156276 "2008-12-23T23:55:51Z")

</div>

I’m running into a problem getting any results from Cucumber at this point. I was able to a while ago, but I upgraded to Rails 2.2.2 and poof! No Cucumber. Any thoughts what might be wrong? Rails 2.2.2 Cucumber 0.1.1…

---

## [After block](https://www.ruby-forum.com/t/after-block/156261)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 1\
**Last updated:** [December 23, 2008, 11:42pm UTC](https://www.ruby-forum.com/t/after-block/156261 "2008-12-23T23:42:21Z")

</div>

Hi, Is the way to figure out the the last scenario executed in the After block? Aidy

---

## [\[cucumber\] rcumber resource mapping](https://www.ruby-forum.com/t/cucumber-rcumber-resource-mapping/156263)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 0\
**Last updated:** [December 23, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/cucumber-rcumber-resource-mapping/156263 "2008-12-23T16:50:08Z")

</div>

Hi Guys, Just installed rcumber and added the following to routes.rb, etc. map.rcumber ‘rcumber’, :controller =\> ‘rcumbers’, :action =\> ‘index’ map.resources :rcumbers do |rcumber| rcumber.run ‘run’, :controller =\> ‘…

---

## [Routing error with webrat](https://www.ruby-forum.com/t/routing-error-with-webrat/156242)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 3\
**Last updated:** [December 23, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/routing-error-with-webrat/156242 "2008-12-23T15:35:00Z")

</div>

Hello I am starting using cucumber with an app using restful\_authentication. I am having an error that is driving me mad. I am using this step Given /^que he hecho login en la aplicaciÃ³n$/ do user = User.create!( …

---

## [Understanding "within"](https://www.ruby-forum.com/t/understanding-within/156226)

<div class="topic-metadata">

**Author:** [@sackerson](https://www.ruby-forum.com/u/sackerson)\
**Replies:** 3\
**Last updated:** [December 23, 2008, 1:59pm UTC](https://www.ruby-forum.com/t/understanding-within/156226 "2008-12-23T13:59:26Z")

</div>

So, I want to test clicking a link in a table and found this handy example by Aslak: http://github.com/aslakhellesoy/cucumber\_rails/tree/master/features/step\_definitions/lorry\_steps.rb When /^I delete the (\\d+)(?:st|n…

---

## [\[cucumber\] automation and historical](https://www.ruby-forum.com/t/cucumber-automation-and-historical/156214)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 7\
**Last updated:** [December 23, 2008, 2:16am UTC](https://www.ruby-forum.com/t/cucumber-automation-and-historical/156214 "2008-12-23T02:16:25Z")

</div>

Hi guys, Can someone point me to information regarding: running cucumber as an automated task decoupled from CI. Assuming cron or similar. parsing and storing results so they can be graphed, etc. Many thanks in adva…

---

## [Cucumber logo poll is open](https://www.ruby-forum.com/t/cucumber-logo-poll-is-open/156122)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 3\
**Last updated:** [December 23, 2008, 1:31am UTC](https://www.ruby-forum.com/t/cucumber-logo-poll-is-open/156122 "2008-12-23T01:31:21Z")

</div>

Cast your ballots! http://cukes.info/

---

## [Calling multiline steps from other steps](https://www.ruby-forum.com/t/calling-multiline-steps-from-other-steps/154909)

<div class="topic-metadata">

**Author:** [@phylae](https://www.ruby-forum.com/u/phylae)\
**Replies:** 8\
**Last updated:** [December 22, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/calling-multiline-steps-from-other-steps/154909 "2008-12-22T21:56:42Z")

</div>

What is the syntax for calling multiline steps from other steps? I’d like to do something like this: Given /^I have filled in the form$/ do |details| details.hashes.each |pair| When “I fill in #{pair\[‘field’\]} with #…

---

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

<div class="topic-metadata">

**Author:** [@slavix](https://www.ruby-forum.com/u/slavix)\
**Replies:** 0\
**Last updated:** [December 21, 2008, 3:11am UTC](https://www.ruby-forum.com/t/cucumber-and-selenium/156125 "2008-12-21T03:11:37Z")

</div>

hello, I am starting out with cucumber and selenium. Whenever I run a rake features on my features or on cucumber/examples/selenium/features too many browser windows start… for example if run cucumber examples/seleni…

---

## [The RSpec Book](https://www.ruby-forum.com/t/the-rspec-book/152811)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 6\
**Last updated:** [December 20, 2008, 3:41am UTC](https://www.ruby-forum.com/t/the-rspec-book/152811 "2008-12-20T03:41:29Z")

</div>

Hey all, I’m pleased to announce that the Pragmatic Bookshelf’s The RSpec Book is almost here. The plan is: beta/pdf in December, 2008 print in April, 2009 The RSpec Book, authored by me, Dave A., Zach D., Aslak He…

---

## [New article on "Listening to Your Specs" up on Ruby Advent 2008](https://www.ruby-forum.com/t/new-article-on-listening-to-your-specs-up-on-ruby-advent-2008/155280)

<div class="topic-metadata">

**Author:** [@avdi](https://www.ruby-forum.com/u/avdi)\
**Replies:** 12\
**Last updated:** [December 19, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/new-article-on-listening-to-your-specs-up-on-ruby-advent-2008/155280 "2008-12-19T21:44:56Z")

</div>

I contributed an article on BDD and RSpec to the Ruby Advent Calendar 2008, going over some of the rules I’ve collected for interpreting what your specs say about your design. It can be found here: http://advent2008.…

---

## [Using semantics in steps](https://www.ruby-forum.com/t/using-semantics-in-steps/156012)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 7\
**Last updated:** [December 19, 2008, 7:34pm UTC](https://www.ruby-forum.com/t/using-semantics-in-steps/156012 "2008-12-19T19:34:05Z")

</div>

Hi All, Wanted to put this idea forward, see what you think of it. I’m using Aslaks lorry feature to illustrate this. See http://github.com/aslakhellesoy/cucumber\_rails/tree/master/features/step\_definitions/lorry\_ste…

---

## [OT: Implementation Question](https://www.ruby-forum.com/t/ot-implementation-question/156034)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [December 19, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/ot-implementation-question/156034 "2008-12-19T18:37:41Z")

</div>

I have asked about this issue on several different mailing lists and have had no response. If anyone here can offer some advice then I would be much obliged. I have a feature that essentially says: Given I have a use…

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

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