# RSpec

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

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

---

## [Rspec-rails question](https://www.ruby-forum.com/t/rspec-rails-question/176252)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 4\
**Last updated:** [October 15, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/rspec-rails-question/176252 "2009-10-15T18:03:05Z")

</div>

I have this controller test: http://pastie.org/632880 And the show method has not been written for the HomeController yet. However, the test still passes. Why?

---

## [Model specs and ActiveRecord::TestCase](https://www.ruby-forum.com/t/model-specs-and-activerecord-testcase/177312)

<div class="topic-metadata">

**Author:** [@mcmire](https://www.ruby-forum.com/u/mcmire)\
**Replies:** 2\
**Last updated:** [October 14, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/model-specs-and-activerecord-testcase/177312 "2009-10-14T21:25:38Z")

</div>

Is there any reason why the ModelExampleGroup in rspec-rails inherits from ActiveSupport::TestCase and not ActiveRecord::TestCase? I noticed this because I tried to use assert\_queries in one of my specs and obviously …

---

## [Should and != operator](https://www.ruby-forum.com/t/should-and-operator/177169)

<div class="topic-metadata">

**Author:** [@Willy\_Mene](https://www.ruby-forum.com/u/Willy_Mene)\
**Replies:** 15\
**Last updated:** [October 14, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/should-and-operator/177169 "2009-10-14T20:14:12Z")

</div>

I’ve tried searching around for something describing how the #should method works with the != operator, but couldn’t find anything conclusive. Can someone please explain while the following lines will pass if placed …

---

## [Resources on using RSpec with Sinatra](https://www.ruby-forum.com/t/resources-on-using-rspec-with-sinatra/177276)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 2\
**Last updated:** [October 14, 2009, 3:05pm UTC](https://www.ruby-forum.com/t/resources-on-using-rspec-with-sinatra/177276 "2009-10-14T15:05:36Z")

</div>

Could anybody post resources on using RSpec with Sinatra?Thanks, Doug.

---

## [Route\_to for ambiguous generation?](https://www.ruby-forum.com/t/route-to-for-ambiguous-generation/177220)

<div class="topic-metadata">

**Author:** [@Clifford\_TSMatthew](https://www.ruby-forum.com/u/Clifford_TSMatthew)\
**Replies:** 3\
**Last updated:** [October 13, 2009, 5:45pm UTC](https://www.ruby-forum.com/t/route-to-for-ambiguous-generation/177220 "2009-10-13T17:45:12Z")

</div>

I like the new route\_to matcher, but I can’t use it for my root route, since the route that is generated isn’t the route that I pass in. Specifically, my routes.rb has: … map.resources :skills, :only =\> \[:index, :sho…

---

## [What argument should I pass for mock(), stub() and double()](https://www.ruby-forum.com/t/what-argument-should-i-pass-for-mock-stub-and-double/177081)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 2\
**Last updated:** [October 11, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/what-argument-should-i-pass-for-mock-stub-and-double/177081 "2009-10-11T14:24:02Z")

</div>

Hi - I’m reading the RSpec book. I see an example like: customer = double(‘customer’) What is the customer that is in the argument for? How is this different from: customer = double() ? Can anybody explain to me? …

---

## [Problems with Set after upgrade to RSpec 1.2.9](https://www.ruby-forum.com/t/problems-with-set-after-upgrade-to-rspec-1-2-9/177069)

<div class="topic-metadata">

**Author:** [@Shot\_SPiotr\_S.S](https://www.ruby-forum.com/u/Shot_SPiotr_S.S)\
**Replies:** 3\
**Last updated:** [October 11, 2009, 1:29pm UTC](https://www.ruby-forum.com/t/problems-with-set-after-upgrade-to-rspec-1-2-9/177069 "2009-10-11T13:29:02Z")

</div>

It seems RSpec 1.2.9 is be breaking my specs in an interesting way (both under Ruby 1.8.7 and 1.9.1). The problem may very well be in my non-standard approach to monkey-patching core/stdlib classes, but my approach do…

---

## [Bmabey-fakefs Not Found Error when installing rspec 1.2.9.rc1](https://www.ruby-forum.com/t/bmabey-fakefs-not-found-error-when-installing-rspec-1-2-9-rc1/176024)

<div class="topic-metadata">

**Author:** [@dans](https://www.ruby-forum.com/u/dans)\
**Replies:** 13\
**Last updated:** [October 10, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/bmabey-fakefs-not-found-error-when-installing-rspec-1-2-9-rc1/176024 "2009-10-10T19:22:01Z")

</div>

I’m trying to install rspec so I can work with the new book chapter. This what the console shows after running “rake install\_gem” Successfully built RubyGem Name: rspec Version: 1.2.9.rc1 File: rspec-1.2.9.rc1.gem …

---

## [Autospec cannont find gems](https://www.ruby-forum.com/t/autospec-cannont-find-gems/176915)

<div class="topic-metadata">

**Author:** [@rube\_noob](https://www.ruby-forum.com/u/rube_noob)\
**Replies:** 0\
**Last updated:** [October 8, 2009, 5:09am UTC](https://www.ruby-forum.com/t/autospec-cannont-find-gems/176915 "2009-10-08T05:09:23Z")

</div>

I am trying to install rspec for rails and have the following gems install C:\\INSTAN~3.0-W\\rails\_apps\\katai\>gem list --local \*\*\* LOCAL GEMS \*\*\* actionmailer (2.3.4, 2.0.2) actionpack (2.3.4, 2.0.2) activerecord (2.…

---

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

<div class="topic-metadata">

**Author:** [@mithunperera](https://www.ruby-forum.com/u/mithunperera)\
**Replies:** 10\
**Last updated:** [October 7, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/need-help/175841 "2009-10-07T23:20:19Z")

</div>

Hi all, I am an university student and these days i am on training period. So i want to know about ruby on on rails “cucumber and Rspec”. If somebody know about these fields please help me. If not please send me an t…

---

## [Rake spec does not run specs -- just writes to spec.opts directory](https://www.ruby-forum.com/t/rake-spec-does-not-run-specs-just-writes-to-spec-opts-directory/176895)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 1\
**Last updated:** [October 7, 2009, 8:56pm UTC](https://www.ruby-forum.com/t/rake-spec-does-not-run-specs-just-writes-to-spec-opts-directory/176895 "2009-10-07T20:56:51Z")

</div>

I am having an issue on my integration server currently. When I run rake spec locally my specs run and all is good but when I run rake spec in on my integration box I get the following output Options written to spec/s…

---

## [Timeouts with ruby 1.9.1](https://www.ruby-forum.com/t/timeouts-with-ruby-1-9-1/176828)

<div class="topic-metadata">

**Author:** [@liseki](https://www.ruby-forum.com/u/liseki)\
**Replies:** 1\
**Last updated:** [October 6, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/timeouts-with-ruby-1-9-1/176828 "2009-10-06T21:25:39Z")

</div>

I find myself in a confused spot. Please note I am running OS X 10.5 ruby 1.9.1p129 (2009-05-12 revision 23412) \[i386-darwin9\] rspec 1.2.9 rspec-rails 1.2.9 TextMate Version 1.5.8 (1509) I have a user model and a c…

---

## [\[ANN\] rspec 1.2.9 Released](https://www.ruby-forum.com/t/ann-rspec-1-2-9-released/176782)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [October 6, 2009, 6:44am UTC](https://www.ruby-forum.com/t/ann-rspec-1-2-9-released/176782 "2009-10-06T06:44:08Z")

</div>

rspec version 1.2.9 has been released! http://rspec.info http://rubyforge.org/projects/rspec http://github.com/dchelimsky/rspec/wikis removed\_email\_address@domain.invalid removed\_email\_address@domain.invalid Behaviour…

---

## [Running a specific row in cucumber example table](https://www.ruby-forum.com/t/running-a-specific-row-in-cucumber-example-table/176584)

<div class="topic-metadata">

**Author:** [@samt](https://www.ruby-forum.com/u/samt)\
**Replies:** 4\
**Last updated:** [October 5, 2009, 1:05pm UTC](https://www.ruby-forum.com/t/running-a-specific-row-in-cucumber-example-table/176584 "2009-10-05T13:05:38Z")

</div>

I want to be able to execute only 1 row in an Scenario/Outline Example table. Is there a method already created for me to access. I have certain validation rules for only running 1 row of data coming from an external …

---

## [Factory girl rspec and authlogic](https://www.ruby-forum.com/t/factory-girl-rspec-and-authlogic/176652)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 1\
**Last updated:** [October 4, 2009, 6:37am UTC](https://www.ruby-forum.com/t/factory-girl-rspec-and-authlogic/176652 "2009-10-04T06:37:08Z")

</div>

I am trying some simple test using the above items. Using the Factory.create(…) gives Active Record errors and not the failure of the test. Change it to u = Factory.build(…) then u.save, I do not get the Active record…

---

## [Is there a good (non-judgemental) comparison of Rspec mocking vs Mocha?](https://www.ruby-forum.com/t/is-there-a-good-non-judgemental-comparison-of-rspec-mocking-vs-mocha/176651)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 1\
**Last updated:** [October 4, 2009, 5:54am UTC](https://www.ruby-forum.com/t/is-there-a-good-non-judgemental-comparison-of-rspec-mocking-vs-mocha/176651 "2009-10-04T05:54:59Z")

</div>

I’ve just picked up a project which has been using test/spec and mocha. We’re in the process of switching over to rspec for the testing framework, and will probably just continue to use mocha for the mocks, although I…

---

## [What's wrong with my newbie cucumber test?](https://www.ruby-forum.com/t/whats-wrong-with-my-newbie-cucumber-test/168158)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 5\
**Last updated:** [October 2, 2009, 3:59pm UTC](https://www.ruby-forum.com/t/whats-wrong-with-my-newbie-cucumber-test/168158 "2009-10-02T15:59:06Z")

</div>

forums.feature Feature: Tasks In order to keep track of tasks People should be able to Create a list of tasks Scenario: List Tasks When I go to the homepage forums\_steps.rb When /^I go to the homepage$/ do visit “/…

---

## [Grabbing the controller name before a new test case](https://www.ruby-forum.com/t/grabbing-the-controller-name-before-a-new-test-case/176486)

<div class="topic-metadata">

**Author:** [@Hates\_S](https://www.ruby-forum.com/u/Hates_S)\
**Replies:** 6\
**Last updated:** [October 1, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/grabbing-the-controller-name-before-a-new-test-case/176486 "2009-10-01T21:39:07Z")

</div>

I currently have: describe Publishers::PagesController I want to be able to grab the path "publishers/pages/ and use that to generate a load of tests automatically. Problem is I can’t figure out how to do it outside …

---

## [Need immeadiate help](https://www.ruby-forum.com/t/need-immeadiate-help/176408)

<div class="topic-metadata">

**Author:** [@mithunperera](https://www.ruby-forum.com/u/mithunperera)\
**Replies:** 3\
**Last updated:** [September 30, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/need-immeadiate-help/176408 "2009-09-30T14:46:45Z")

</div>

Hi all, I am going to do testing using Rspec. But i have no idea about that . so i need good tutorial for that. if anybody has such tutorials please help me by sending them. thanks, mithun

---

## [Spec --drb always has a successful exit code even when specs fail](https://www.ruby-forum.com/t/spec-drb-always-has-a-successful-exit-code-even-when-specs-fail/176382)

<div class="topic-metadata">

**Author:** [@mcmire](https://www.ruby-forum.com/u/mcmire)\
**Replies:** 0\
**Last updated:** [September 29, 2009, 10:10pm UTC](https://www.ruby-forum.com/t/spec-drb-always-has-a-successful-exit-code-even-when-specs-fail/176382 "2009-09-29T22:10:53Z")

</div>

Okay, so what I’m trying to do is write a rake task that runs my specs and then, if they succeed, run svn commit. (In lieu of continuous integration since I want it to happen semi-manually for now.) So basically I’m r…

---

## [Feedback on 1.2.9.rc1](https://www.ruby-forum.com/t/feedback-on-1-2-9-rc1/176267)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 3\
**Last updated:** [September 29, 2009, 5:39am UTC](https://www.ruby-forum.com/t/feedback-on-1-2-9-rc1/176267 "2009-09-29T05:39:01Z")

</div>

Hey all, I haven’t received any feedback on the rspec and rspec-rails-1.2.9.rc1 gems. Is anybody using them? Any issues? TIA, David

---

## [Mailing list for BDD?](https://www.ruby-forum.com/t/mailing-list-for-bdd/176259)

<div class="topic-metadata">

**Author:** [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Replies:** 1\
**Last updated:** [September 28, 2009, 6:56am UTC](https://www.ruby-forum.com/t/mailing-list-for-bdd/176259 "2009-09-28T06:56:48Z")

</div>

Sorry for the cross post, but does anyone know of a list dedicated to just BDD? Seems like all the discussion is happening over on rspec-users, some on the tdd list. My interest is in the abstract concept of behavior …

---

## [Controller specs with non-RESTful routes](https://www.ruby-forum.com/t/controller-specs-with-non-restful-routes/175371)

<div class="topic-metadata">

**Author:** [@giuseb](https://www.ruby-forum.com/u/giuseb)\
**Replies:** 10\
**Last updated:** [September 27, 2009, 12:18am UTC](https://www.ruby-forum.com/t/controller-specs-with-non-restful-routes/175371 "2009-09-27T00:18:52Z")

</div>

Hello list, this should be an easy one, but I seem to be stuck. What is the proper way to mimic a POST request for a named, non-RESTful route? here’s the route and the rest of the setup: map.accept\_invitation ‘/acce…

---

## [Re: How to spec transaction in Controller?](https://www.ruby-forum.com/t/re-how-to-spec-transaction-in-controller/176166)

<div class="topic-metadata">

**Author:** [@codinggurl](https://www.ruby-forum.com/u/codinggurl)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/re-how-to-spec-transaction-in-controller/176166 "2009-09-25T18:02:33Z")

</div>

Hello David, thank you very much for your very detailed answer !! I’ll act on your advice and remove the transaction logic from the controller. So that the controller has to call only one method, which is defined in …

---

## [How to spec transaction in Controller?](https://www.ruby-forum.com/t/how-to-spec-transaction-in-controller/226051)

<div class="topic-metadata">

**Author:** [@codinggurl](https://www.ruby-forum.com/u/codinggurl)\
**Replies:** 1\
**Last updated:** [September 25, 2009, 11:58am UTC](https://www.ruby-forum.com/t/how-to-spec-transaction-in-controller/226051 "2009-09-25T11:58:25Z")

</div>

Hi, in my Controller I have some tansactions. I’m trying to write specs, which test the two program pathes (an exception is thrown or no exception is thrown). But the test seems always to go into the path, where the …

---

## [DRYing out controller specs?](https://www.ruby-forum.com/t/drying-out-controller-specs/176131)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 1\
**Last updated:** [September 25, 2009, 4:33am UTC](https://www.ruby-forum.com/t/drying-out-controller-specs/176131 "2009-09-25T04:33:30Z")

</div>

I’d like to DRY out my controller specs but am having difficulties doing so and am hopeful that a more experienced rspec expert can shed some much-needed light on my woes… The controllers themselves are using josevali…

---

## [DRYing out controller specs?](https://www.ruby-forum.com/t/drying-out-controller-specs/176132)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [September 25, 2009, 2:28am UTC](https://www.ruby-forum.com/t/drying-out-controller-specs/176132 "2009-09-25T02:28:14Z")

</div>

I’d like to DRY out my controller specs but am having difficulties doing so and am hopeful that a more experienced rspec expert can shed some much-needed light on my woes… The controllers themselves are using josevali…

---

## [Rspec --drb --port](https://www.ruby-forum.com/t/rspec-drb-port/176110)

<div class="topic-metadata">

**Author:** [@chrisfinne](https://www.ruby-forum.com/u/chrisfinne)\
**Replies:** 0\
**Last updated:** [September 24, 2009, 10:28pm UTC](https://www.ruby-forum.com/t/rspec-drb-port/176110 "2009-09-24T22:28:44Z")

</div>

Hey, I’m having a bit of a Works For Me™ problem with my patch to rspec. The idea of the patch is to allow specifying a non-default port for the –drb option to connect to. I got the matching patches into Cucumber an…

---

## [Issues with rspec 1.2.8 and ruby 1.9](https://www.ruby-forum.com/t/issues-with-rspec-1-2-8-and-ruby-1-9/176085)

<div class="topic-metadata">

**Author:** [@Xavier\_To](https://www.ruby-forum.com/u/Xavier_To)\
**Replies:** 1\
**Last updated:** [September 24, 2009, 4:02pm UTC](https://www.ruby-forum.com/t/issues-with-rspec-1-2-8-and-ruby-1-9/176085 "2009-09-24T16:02:55Z")

</div>

Hi, I just tried upgrading to ruby 1.9 and rspec has been giving me strange errors when I run them with “rake spec”. I get for almost every test gives me a “can’t modify frozen object” The other thing that confuses …

---

## [TextMate bundle and Rails controller specs](https://www.ruby-forum.com/t/textmate-bundle-and-rails-controller-specs/176050)

<div class="topic-metadata">

**Author:** [@skizzybiz](https://www.ruby-forum.com/u/skizzybiz)\
**Replies:** 0\
**Last updated:** [September 24, 2009, 12:55am UTC](https://www.ruby-forum.com/t/textmate-bundle-and-rails-controller-specs/176050 "2009-09-24T00:55:01Z")

</div>

I’ve been following along with the examples in The RSpec Book (beta 10, Pragmatic Programmers), and I get a failure in the controller tests when I run them in TextMate, but not from the command line. I have the follow…

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

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