# RSpec

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

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

---

## [Testing .Net Newbie](https://www.ruby-forum.com/t/testing-net-newbie/181601)

<div class="topic-metadata">

**Author:** [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Replies:** 15\
**Last updated:** [January 15, 2010, 9:57am UTC](https://www.ruby-forum.com/t/testing-net-newbie/181601 "2010-01-15T09:57:47Z")

</div>

Hi, I’ve been a .Net developer for a number of years now and I’m a big fan of TDD / BDD. I have been following these principles for a couple of years and use tools such as NUnit for testing purposes. I am now lookin…

---

## [Selenium client gem](https://www.ruby-forum.com/t/selenium-client-gem/181624)

<div class="topic-metadata">

**Author:** [@Onno\_van\_der\_Straat](https://www.ruby-forum.com/u/Onno_van_der_Straat)\
**Replies:** 2\
**Last updated:** [January 14, 2010, 9:59pm UTC](https://www.ruby-forum.com/t/selenium-client-gem/181624 "2010-01-14T21:59:36Z")

</div>

Hi, I’m trying to install the selenium client with gem install selenium-client. This returns the following message ERROR: could not find gem selenium-client locally or in a repository BTW, I’m following the RSpec b…

---

## [Test-unit oddities](https://www.ruby-forum.com/t/test-unit-oddities/181582)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [January 14, 2010, 4:25am UTC](https://www.ruby-forum.com/t/test-unit-oddities/181582 "2010-01-14T04:25:10Z")

</div>

I think I’ve tracked down why rspec dislikes test-unit gems \> 1.3.5 this code: gem ‘rails’, ‘= 2.3.5’ puts $LOAD\_PATH.find{|l| l.instance\_variables.include? (:@gem\_prelude\_index)} puts $LOAD\_PATH.uniq.find{|l| l.ins…

---

## [Nested steps](https://www.ruby-forum.com/t/nested-steps/181511)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [January 13, 2010, 7:30pm UTC](https://www.ruby-forum.com/t/nested-steps/181511 "2010-01-13T19:30:13Z")

</div>

Question. Currently rspec appears to allow for a two-step test system, like context “abc” it ‘should do y’ do end end It might be convenient to have an arbitrary number of nests, like context “abc” it ‘should do …

---

## [Chad Humphries](https://www.ruby-forum.com/t/chad-humphries/181446)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [January 12, 2010, 5:18am UTC](https://www.ruby-forum.com/t/chad-humphries/181446 "2010-01-12T05:18:36Z")

</div>

Welcome Chad H. to the Rspec Development Team! http://blog.davidchelimsky.net/2010/01/12/welcome-chad-humphries/

---

## [Code for the RSpec book](https://www.ruby-forum.com/t/code-for-the-rspec-book/181365)

<div class="topic-metadata">

**Author:** [@Onno\_van\_der\_Straat](https://www.ruby-forum.com/u/Onno_van_der_Straat)\
**Replies:** 1\
**Last updated:** [January 11, 2010, 3:57am UTC](https://www.ruby-forum.com/t/code-for-the-rspec-book/181365 "2010-01-11T03:57:20Z")

</div>

Hi, I’m trying to download the code for the RSpec book from github http://wiki.github.com/dchelimsky/rspec/code-for-the-rspec-book-beta. When I click ‘Download Source’ a window with a busy icon appears and then noth…

---

## [Stubbing through multiple layers](https://www.ruby-forum.com/t/stubbing-through-multiple-layers/181302)

<div class="topic-metadata">

**Author:** [@DeNigris\_S](https://www.ruby-forum.com/u/DeNigris_S)\
**Replies:** 5\
**Last updated:** [January 10, 2010, 2:53pm UTC](https://www.ruby-forum.com/t/stubbing-through-multiple-layers/181302 "2010-01-10T14:53:39Z")

</div>

Hi list, I’m writing an example for a class that represents the “pickaxe” e-book, which I view in Preview.app: describe PickaxeBook do … it “should tell whether it’s ready to read” do preview = stub(‘preview’) pre…

---

## [Straight strings?](https://www.ruby-forum.com/t/straight-strings/181324)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [January 9, 2010, 8:47pm UTC](https://www.ruby-forum.com/t/straight-strings/181324 "2010-01-09T20:47:36Z")

</div>

I saw some tests like this the other day: it “the nodes are the contents of the directory” do … end Made me wonder if the idea had been proposed to skip the it, like. “the nodes are the contents of the directory”.do…

---

## [More verbosity for be\_an?](https://www.ruby-forum.com/t/more-verbosity-for-be-an/180884)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 12\
**Last updated:** [January 9, 2010, 7:53pm UTC](https://www.ruby-forum.com/t/more-verbosity-for-be-an/180884 "2010-01-09T19:53:45Z")

</div>

before I hack up a patch for it. Would a patch to change “expected Fixnum to be a kind of Fixnum” to “expected Fixnum to be a kind of Fixnum (is a Class)” or possibly “expected Fixnum to be a kind of Fixnum (is a C…

---

## [How call a method/something after ALL specs?](https://www.ruby-forum.com/t/how-call-a-method-something-after-all-specs/181264)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 1\
**Last updated:** [January 8, 2010, 2:52pm UTC](https://www.ruby-forum.com/t/how-call-a-method-something-after-all-specs/181264 "2010-01-08T14:52:38Z")

</div>

hi, is there a way to call a method/print something after ALL the specs are run ? (with all, i mean all, after all the spec files, just before the rspec output which say how many spec have passed)… i want to print som…

---

## [Problem with should\_not when passing a multiple args to a matcher](https://www.ruby-forum.com/t/problem-with-should-not-when-passing-a-multiple-args-to-a-matcher/181186)

<div class="topic-metadata">

**Author:** [@killswitchcollectiv](https://www.ruby-forum.com/u/killswitchcollectiv)\
**Replies:** 4\
**Last updated:** [January 7, 2010, 7:41pm UTC](https://www.ruby-forum.com/t/problem-with-should-not-when-passing-a-multiple-args-to-a-matcher/181186 "2010-01-07T19:41:55Z")

</div>

We seem to be hitting some undesirable behavior with should\_not in combination with matchers that accept collections. Let me use the “include” matcher for example (a co-worker reported similar problems using “be\_any”…

---

## [Get to a different controller](https://www.ruby-forum.com/t/get-to-a-different-controller/181111)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 17\
**Last updated:** [January 7, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/get-to-a-different-controller/181111 "2010-01-07T16:09:22Z")

</div>

I’m trying to implement a base controller that other controllers descend from, and am having a bit of difficulty in testing the sole “feature” of the base controller. In the “not redirecting when user is an admin” c…

---

## [Describe "RSpec's documentation" do](https://www.ruby-forum.com/t/describe-rspecs-documentation-do/178560)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 11\
**Last updated:** [January 7, 2010, 1:55am UTC](https://www.ruby-forum.com/t/describe-rspecs-documentation-do/178560 "2010-01-07T01:55:16Z")

</div>

Hi all, describe “RSpec’s documentation” do it “should be helpful” it “should be maintainable” end I’ve been wanting to improve RSpec’s documentation situation for a long time, but my writing energies have been con…

---

## [Fixtures problem with Rails plugin](https://www.ruby-forum.com/t/fixtures-problem-with-rails-plugin/180996)

<div class="topic-metadata">

**Author:** [@John\_jSCuckler](https://www.ruby-forum.com/u/John_jSCuckler)\
**Replies:** 1\
**Last updated:** [January 7, 2010, 12:29am UTC](https://www.ruby-forum.com/t/fixtures-problem-with-rails-plugin/180996 "2010-01-07T00:29:47Z")

</div>

Hi, I just wrote some specs for a rails plugin, I’m using some fixtures and rake:spec:plugins works fine as long as there is only this plugin loaded in the application, but if I add another one it doesn’t load fixture…

---

## [Adding stubs for an included argument](https://www.ruby-forum.com/t/adding-stubs-for-an-included-argument/181109)

<div class="topic-metadata">

**Author:** [@edvardm](https://www.ruby-forum.com/u/edvardm)\
**Replies:** 2\
**Last updated:** [January 6, 2010, 2:25pm UTC](https://www.ruby-forum.com/t/adding-stubs-for-an-included-argument/181109 "2010-01-06T14:25:39Z")

</div>

Hi, My scenario is as follows, and so far I have not found the clean way to implement the following. In a method I have a method called allowed\_for?(\*args) used as follows: … if o.allowed\_for?(:foo, :bar) #case a …

---

## ['Expected NoMethodError, got NameError'](https://www.ruby-forum.com/t/expected-nomethoderror-got-nameerror/180872)

<div class="topic-metadata">

**Author:** [@phudson1442](https://www.ruby-forum.com/u/phudson1442)\
**Replies:** 7\
**Last updated:** [January 6, 2010, 12:12am UTC](https://www.ruby-forum.com/t/expected-nomethoderror-got-nameerror/180872 "2010-01-06T00:12:53Z")

</div>

Given this simple cucumber feature (related to another rspec bug I am working on): stubs\_dont\_leak.feature · GitHub I’m fighting with this error messages that only shows up in certain situations that I can’t quite pi…

---

## [Loading numerous data structures from YAML files](https://www.ruby-forum.com/t/loading-numerous-data-structures-from-yaml-files/180969)

<div class="topic-metadata">

**Author:** [@tekhne](https://www.ruby-forum.com/u/tekhne)\
**Replies:** 3\
**Last updated:** [January 5, 2010, 4:07am UTC](https://www.ruby-forum.com/t/loading-numerous-data-structures-from-yaml-files/180969 "2010-01-05T04:07:04Z")

</div>

All, I am writing specs for some multi-stage tests which require a lot of input data. A simplified overview of the tests is as follows: Provide list of network interfaces, confirm they are added to the database Pro…

---

## ["RESTful" controller specs in rails](https://www.ruby-forum.com/t/restful-controller-specs-in-rails/181059)

<div class="topic-metadata">

**Author:** [@NicolSSSSs\_Sanguine](https://www.ruby-forum.com/u/NicolSSSSs_Sanguine)\
**Replies:** 2\
**Last updated:** [January 5, 2010, 12:04am UTC](https://www.ruby-forum.com/t/restful-controller-specs-in-rails/181059 "2010-01-05T00:04:42Z")

</div>

So, what’s the awesome sauce everyone is using for this? In the past I’ve used shared behaviors, and rspec\_on\_rails\_on\_crack to solve all the repetition in the controller specs, but I’ve been away from rspec for a whi…

---

## [Question about structuring specs](https://www.ruby-forum.com/t/question-about-structuring-specs/181042)

<div class="topic-metadata">

**Author:** [@Ijonas\_Kisselbach](https://www.ruby-forum.com/u/Ijonas_Kisselbach)\
**Replies:** 6\
**Last updated:** [January 4, 2010, 2:43pm UTC](https://www.ruby-forum.com/t/question-about-structuring-specs/181042 "2010-01-04T14:43:24Z")

</div>

Hi, I’m struggling with structuring my specs describing a large process in my app. There are multiple paths of execution through that process each of which I’m trying to describe using a different rspec context, eg. …

---

## [Disabling before filters in rspec?](https://www.ruby-forum.com/t/disabling-before-filters-in-rspec/181040)

<div class="topic-metadata">

**Author:** [@jollyroger](https://www.ruby-forum.com/u/jollyroger)\
**Replies:** 2\
**Last updated:** [January 4, 2010, 12:34pm UTC](https://www.ruby-forum.com/t/disabling-before-filters-in-rspec/181040 "2010-01-04T12:34:03Z")

</div>

Hey guys, i have this before-filter in my application-controller: def login\_required if !current\_user redirect\_to join\_welcome\_path and return end end This before-filter is prepended before all other before-filter…

---

## [Private method in custom module](https://www.ruby-forum.com/t/private-method-in-custom-module/180925)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 4\
**Last updated:** [December 31, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/private-method-in-custom-module/180925 "2009-12-31T21:25:11Z")

</div>

I have a module of custom examples, such as module ControllerHelperMethods module MyExampleGroupMethods def should\_set\_the\_body\_id(body\_id) it “should set the body id to ‘#{body\_id}’” do assigns\[:body\_id\].should == …

---

## [Naming help, please](https://www.ruby-forum.com/t/naming-help-please/180927)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [December 31, 2009, 8:00pm UTC](https://www.ruby-forum.com/t/naming-help-please/180927 "2009-12-31T20:00:18Z")

</div>

Hey all, If you like coming up with the perfect method name, please join the fun at Lighthouse - Beautifully Simple Issue Tracking. Cheers, and happy new year! David

---

## [Submitting a Custom Matcher: gem or other method?](https://www.ruby-forum.com/t/submitting-a-custom-matcher-gem-or-other-method/180722)

<div class="topic-metadata">

**Author:** [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Replies:** 8\
**Last updated:** [December 30, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/submitting-a-custom-matcher-gem-or-other-method/180722 "2009-12-30T23:32:56Z")

</div>

Hi, I have a custom matcher that I call XMLDiff that takes an actual XML string and an expected one and uses RSpec’s normal line differ to show the difference at the node level. It uses a method called be\_functionaly\_…

---

## [Spec time reporting precision](https://www.ruby-forum.com/t/spec-time-reporting-precision/180856)

<div class="topic-metadata">

**Author:** [@t73net](https://www.ruby-forum.com/u/t73net)\
**Replies:** 3\
**Last updated:** [December 30, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/spec-time-reporting-precision/180856 "2009-12-30T17:34:06Z")

</div>

Hey all, So I woke up early this morning, and was running some tests through autospec, and it returned a time as follows: Finished in 0.0151600000000001 seconds I know that there are alot of other more important issu…

---

## [Running cucumber against an application](https://www.ruby-forum.com/t/running-cucumber-against-an-application/180839)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [December 30, 2009, 4:32am UTC](https://www.ruby-forum.com/t/running-cucumber-against-an-application/180839 "2009-12-30T04:32:08Z")

</div>

Hello, I have a very simple non-web application I am trying to test against. Say I have a library folder with several .rb files, and the one that is to be executed is main.rb (‘ruby main.rb’ via command line). How wou…

---

## [No should raise\_exception](https://www.ruby-forum.com/t/no-should-raise-exception/180489)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 9\
**Last updated:** [December 29, 2009, 4:29pm UTC](https://www.ruby-forum.com/t/no-should-raise-exception/180489 "2009-12-29T16:29:10Z")

</div>

I know there’s a raise\_error however…exceptions are not always errors, so I had expected a raise\_exception matcher…would this be a reasonable addition (I’d be happy to do it). Thanks. -r

---

## [Listing all specs in a given file](https://www.ruby-forum.com/t/listing-all-specs-in-a-given-file/180761)

<div class="topic-metadata">

**Author:** [@williamtaft](https://www.ruby-forum.com/u/williamtaft)\
**Replies:** 2\
**Last updated:** [December 29, 2009, 11:10am UTC](https://www.ruby-forum.com/t/listing-all-specs-in-a-given-file/180761 "2009-12-29T11:10:59Z")

</div>

I’m trying to write a simple spec dispatcher, the client-side of which essentially does the following: options = Spec::runner::OptionParser.parse( “#{file}”, $stderr, std\_out ) options.line\_number = line Spec::runne…

---

## [Help with w3c html validation on every rspec requests](https://www.ruby-forum.com/t/help-with-w3c-html-validation-on-every-rspec-requests/180784)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 0\
**Last updated:** [December 29, 2009, 2:17am UTC](https://www.ruby-forum.com/t/help-with-w3c-html-validation-on-every-rspec-requests/180784 "2009-12-29T02:17:45Z")

</div>

Hi, I’m studying rspec in these days (the rspec book is really great… i’ll wait for the missing chapters and a next “rspec advanced book” :slight\_smile: ). But for now i’m trying to solve a problem. I’m a kind of w3c …

---

## [Rake spec seems to not clean the database after failing specs](https://www.ruby-forum.com/t/rake-spec-seems-to-not-clean-the-database-after-failing-specs/180782)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 1\
**Last updated:** [December 29, 2009, 1:24am UTC](https://www.ruby-forum.com/t/rake-spec-seems-to-not-clean-the-database-after-failing-specs/180782 "2009-12-29T01:24:30Z")

</div>

running all specs with ‘rake spec’ working on a spec that gets run last. when run individually, it is green. but in ‘rake spec’ it fails because the database is dirty I’m guessing this is caused by early specs that f…

---

## [Eq(expected)](https://www.ruby-forum.com/t/eq-expected/180770)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [December 28, 2009, 8:35pm UTC](https://www.ruby-forum.com/t/eq-expected/180770 "2009-12-28T20:35:20Z")

</div>

Hey all, I’m thinking of adding an eq(expected) matcher. Please comment in Lighthouse - Beautifully Simple Issue Tracking if you’re interested. Cheers, David

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

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