# RSpec

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

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

---

## [\[Rspec\] Problems with autospec](https://www.ruby-forum.com/t/rspec-problems-with-autospec/167973)

<div class="topic-metadata">

**Author:** [@Hugo\_B](https://www.ruby-forum.com/u/Hugo_B)\
**Replies:** 4\
**Last updated:** [May 21, 2009, 1:10pm UTC](https://www.ruby-forum.com/t/rspec-problems-with-autospec/167973 "2009-05-21T13:10:45Z")

</div>

Hi guys, I am having a problem with autospec. I upgraded to rspec-1.2.6, then I tried to run my specs with autospec. All my specs passes (green), until here, that’s all ok. The problem is that after all my specs have …

---

## [Error in executing controller spec](https://www.ruby-forum.com/t/error-in-executing-controller-spec/167492)

<div class="topic-metadata">

**Author:** [@tornado](https://www.ruby-forum.com/u/tornado)\
**Replies:** 12\
**Last updated:** [May 21, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/error-in-executing-controller-spec/167492 "2009-05-21T12:11:00Z")

</div>

Hello, I am trying to execute controller spec but it gives me error which says @controller is nil: make sure you set it in your test's setup method. I tried to search for the solution but till now no success :frow…

---

## [How to deal with redirect\_to on cucumber?](https://www.ruby-forum.com/t/how-to-deal-with-redirect-to-on-cucumber/168424)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 11:24am UTC](https://www.ruby-forum.com/t/how-to-deal-with-redirect-to-on-cucumber/168424 "2009-05-21T11:24:45Z")

</div>

I have a controller name forums and a action like this: def show redirect\_to forum\_topics\_path(:forum\_id =\> params\[:id\]) end my scenario is (not completed) Scenario: User input data correct When I run to the forum 1 …

---

## [Change cache\_classes on the fly?](https://www.ruby-forum.com/t/change-cache-classes-on-the-fly/168415)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 7:27am UTC](https://www.ruby-forum.com/t/change-cache-classes-on-the-fly/168415 "2009-05-21T07:27:04Z")

</div>

Strange request, I know…also seems pretty unlikely that it will work, but: Any thoughts on how I might change the setting on the fly (or stub it)? I’m stopping certain classes loading in production, and I’d like to …

---

## [Failing feature step when have\_selector uses block](https://www.ruby-forum.com/t/failing-feature-step-when-have-selector-uses-block/168398)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 1\
**Last updated:** [May 20, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/failing-feature-step-when-have-selector-uses-block/168398 "2009-05-20T23:11:57Z")

</div>

Hi – I have a strange bug. The following step will pass: Then /^I should not see any options for the properties$/ do response.should have\_selector( “table thead” ) end But this will fail: Then /^I should not see an…

---

## [\[Cucumber\] \[Ann\] Salad, aka Multi-instance Cucumber](https://www.ruby-forum.com/t/cucumber-ann-salad-aka-multi-instance-cucumber/168406)

<div class="topic-metadata">

**Author:** [@bartz](https://www.ruby-forum.com/u/bartz)\
**Replies:** 0\
**Last updated:** [May 20, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/cucumber-ann-salad-aka-multi-instance-cucumber/168406 "2009-05-20T14:55:43Z")

</div>

(Apologies for crossposting) Yesterday, my pair and I wrote a rough rake task to run features against multiple instances of Cucumber. We decided to call it Salad, since multiple cucumbers makes a nice salad :). The sc…

---

## [When to stub\_model?](https://www.ruby-forum.com/t/when-to-stub-model/168319)

<div class="topic-metadata">

**Author:** [@biglandowner](https://www.ruby-forum.com/u/biglandowner)\
**Replies:** 5\
**Last updated:** [May 20, 2009, 1:12pm UTC](https://www.ruby-forum.com/t/when-to-stub-model/168319 "2009-05-20T13:12:54Z")

</div>

I am trying to specify a controller with RSpec for the first time. I have been using mock\_model to date but, given that the models are fully implemented, I am wondering if I should be using stub\_model. Based on what I…

---

## [Auto test?](https://www.ruby-forum.com/t/auto-test/168377)

<div class="topic-metadata">

**Author:** [@manoah](https://www.ruby-forum.com/u/manoah)\
**Replies:** 5\
**Last updated:** [May 20, 2009, 12:35pm UTC](https://www.ruby-forum.com/t/auto-test/168377 "2009-05-20T12:35:56Z")

</div>

I am new to rspec I am using ZenTest gem. I ran the autospec from the root directory. I am getting the below error. c:/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.10.0/lib/autotest.rb:190:in expand\_path': couldn't find HOM…

---

## [Forum.count.should, should doesn't work?](https://www.ruby-forum.com/t/forum-count-should-should-doesnt-work/168325)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 4\
**Last updated:** [May 20, 2009, 11:18am UTC](https://www.ruby-forum.com/t/forum-count-should-should-doesnt-work/168325 "2009-05-20T11:18:00Z")

</div>

Scenario: List Tasks Then I should have 3 forums Then /^I should have (\[0-9\]+) forums$/ do |counts| Forum.count.should == counts.to\_i end ==== When I go to the homepage # features/step\_definitions/webrat\_steps.rb…

---

## [\[Cucumber\] JUnit, Spring and autowiring](https://www.ruby-forum.com/t/cucumber-junit-spring-and-autowiring/168226)

<div class="topic-metadata">

**Author:** [@mikaelvik](https://www.ruby-forum.com/u/mikaelvik)\
**Replies:** 1\
**Last updated:** [May 20, 2009, 11:02am UTC](https://www.ruby-forum.com/t/cucumber-junit-spring-and-autowiring/168226 "2009-05-20T11:02:44Z")

</div>

We are having trouble with JUnit-tests that are doing dependency injection in the setup of database connections. The stacktrace identifies autowiring of sessionFactory as the problem. During bean creation of sessionF…

---

## [Getting strings in results](https://www.ruby-forum.com/t/getting-strings-in-results/168379)

<div class="topic-metadata">

**Author:** [@manoah](https://www.ruby-forum.com/u/manoah)\
**Replies:** 3\
**Last updated:** [May 20, 2009, 9:55am UTC](https://www.ruby-forum.com/t/getting-strings-in-results/168379 "2009-05-20T09:55:56Z")

</div>

Earlier I used rspec for a small module in which I could see the string used in the example displayed in the results for eg. 1.should be success 2. should be redirect(failed) 2 examples, 1 failure Now I upgraded th…

---

## [Unexpected message expectations issue](https://www.ruby-forum.com/t/unexpected-message-expectations-issue/168354)

<div class="topic-metadata">

**Author:** [@barunio](https://www.ruby-forum.com/u/barunio)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/unexpected-message-expectations-issue/168354 "2009-05-19T23:33:45Z")

</div>

Suppose a User has many Items, and I want to spec that when a user is destroyed its associated items are destroyed. I’m seeing some unexpected behavior: describe User do before(:each) do @user = create\_user # he…

---

## [\[RSpec, Rails\] POST create action spec and before\_filter](https://www.ruby-forum.com/t/rspec-rails-post-create-action-spec-and-before-filter/168277)

<div class="topic-metadata">

**Author:** [@Florent\_F.rent](https://www.ruby-forum.com/u/Florent_F.rent)\
**Replies:** 4\
**Last updated:** [May 19, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/rspec-rails-post-create-action-spec-and-before-filter/168277 "2009-05-19T21:18:06Z")

</div>

Hello, I face the following problem for a POST create action spec. I have this controller: http://pastie.org/482270 I wrote this spec: http://pastie.org/482273 The spec “should set @context” works fine. But when run…

---

## [Skipping the testscenario based on Given block execution](https://www.ruby-forum.com/t/skipping-the-testscenario-based-on-given-block-execution/168243)

<div class="topic-metadata">

**Author:** [@anilg](https://www.ruby-forum.com/u/anilg)\
**Replies:** 5\
**Last updated:** [May 19, 2009, 1:04pm UTC](https://www.ruby-forum.com/t/skipping-the-testscenario-based-on-given-block-execution/168243 "2009-05-19T13:04:31Z")

</div>

Hi, Generally in cucumber, we write the preconditions in GIVEN block, Is there any way in cucumber using which test scenario execution is skipped, based on the Given block execution. Because there is no point in exec…

---

## [Using "return" in rspec test](https://www.ruby-forum.com/t/using-return-in-rspec-test/168278)

<div class="topic-metadata">

**Author:** [@figo2476](https://www.ruby-forum.com/u/figo2476)\
**Replies:** 2\
**Last updated:** [May 19, 2009, 5:57am UTC](https://www.ruby-forum.com/t/using-return-in-rspec-test/168278 "2009-05-19T05:57:45Z")

</div>

Hi, I am still new to rspec and I wonder if anyone can give me some insight about the problem I have encountered. I notice whenever I use “return” in my test, it will skip all the examples and exit right out of my te…

---

## [Cucumber + Authorize.net CIM](https://www.ruby-forum.com/t/cucumber-authorize-net-cim/168253)

<div class="topic-metadata">

**Author:** [@vanight](https://www.ruby-forum.com/u/vanight)\
**Replies:** 2\
**Last updated:** [May 18, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/cucumber-authorize-net-cim/168253 "2009-05-18T23:02:58Z")

</div>

Hi all, I’m curious how one would recommend testing authorize.net customer information manager storage with cucumber stories. In my checkout process testing, my code sends user profile/card/address information to the…

---

## [Cucumber rake/webrat issue](https://www.ruby-forum.com/t/cucumber-rake-webrat-issue/168261)

<div class="topic-metadata">

**Author:** [@Matthew\_Van\_Horn](https://www.ruby-forum.com/u/Matthew_Van_Horn)\
**Replies:** 4\
**Last updated:** [May 18, 2009, 9:22pm UTC](https://www.ruby-forum.com/t/cucumber-rake-webrat-issue/168261 "2009-05-18T21:22:07Z")

</div>

I’m probably missing something really obvious, but I just upgraded cucumber, rspec/rails, and webrat on a project, and for some reason, cucumber is not seeing any of the webrat steps (or bmabey’s email steps) when run…

---

## [\[Cucumber\] ANN: New Google Group for Cucumber](https://www.ruby-forum.com/t/cucumber-ann-new-google-group-for-cucumber/168256)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 1\
**Last updated:** [May 18, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/cucumber-ann-new-google-group-for-cucumber/168256 "2009-05-18T21:08:01Z")

</div>

David C. and I have decided that it’s now best to create a separate mailing list for Cucumber. The RSpec mailing lists remain the same, but we’re hoping that you will all move Cucumber related discussions to this new …

---

## [Running 1 example](https://www.ruby-forum.com/t/running-1-example/168227)

<div class="topic-metadata">

**Author:** [@lawrence.pit](https://www.ruby-forum.com/u/lawrence.pit)\
**Replies:** 2\
**Last updated:** [May 18, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/running-1-example/168227 "2009-05-18T21:06:49Z")

</div>

Hi, Suppose you have a file with dozens of examples within several describe/context blocks, and you wanted to focus on just one example. Is there an easy way to run just that one example instead of all the examples i…

---

## [Recommendations on multi-view scenarios?](https://www.ruby-forum.com/t/recommendations-on-multi-view-scenarios/168240)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 1\
**Last updated:** [May 18, 2009, 8:28pm UTC](https://www.ruby-forum.com/t/recommendations-on-multi-view-scenarios/168240 "2009-05-18T20:28:06Z")

</div>

I’m trying to find out best practices for a multi-view scenario. Take the classic example of ecommerce, where you might first enter address information, then credit card information, then confirm it all and the purch…

---

## [List Split](https://www.ruby-forum.com/t/list-split/168232)

<div class="topic-metadata">

**Author:** [@leemhenson](https://www.ruby-forum.com/u/leemhenson)\
**Replies:** 6\
**Last updated:** [May 18, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/list-split/168232 "2009-05-18T20:18:32Z")

</div>

I’m honestly sure that nobody cares, but this list needs to split, I can’t handle the volume of junk that is completely irrelevant because I am subscribed looking for to keep up to date with cucumber wisdom; I’m goin…

---

## [Insight needed into misbehaving expectations needed](https://www.ruby-forum.com/t/insight-needed-into-misbehaving-expectations-needed/168246)

<div class="topic-metadata">

**Author:** [@kennethkalmer](https://www.ruby-forum.com/u/kennethkalmer)\
**Replies:** 1\
**Last updated:** [May 18, 2009, 6:30pm UTC](https://www.ruby-forum.com/t/insight-needed-into-misbehaving-expectations-needed/168246 "2009-05-18T18:30:57Z")

</div>

Hi everyone I have a peculiar scenario that I don’t know how to debug, or get to the bottom of, and need some insight. Environment: Rails 2.3.2 rspec 1.2.6 & rspec-rails 1.2.6 (vendored gems) mocha 0.9.5 (vendored) …

---

## [\[cucumber\] fat client continued(?)](https://www.ruby-forum.com/t/cucumber-fat-client-continued/168239)

<div class="topic-metadata">

**Author:** [@Jeroen\_van\_Dijk](https://www.ruby-forum.com/u/Jeroen_van_Dijk)\
**Replies:** 0\
**Last updated:** [May 18, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/cucumber-fat-client-continued/168239 "2009-05-18T17:10:31Z")

</div>

Hi All, I’m looking for a cucumber (browser) client where the product owner can browse/edit features and see the status of the features. So far I tried the rcumber plugin (found here http://wiki.github.com/aslakhell…

---

## [New setup error. no such file to load -- spec/story](https://www.ruby-forum.com/t/new-setup-error-no-such-file-to-load-spec-story/168194)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 2\
**Last updated:** [May 18, 2009, 4:09pm UTC](https://www.ruby-forum.com/t/new-setup-error-no-such-file-to-load-spec-story/168194 "2009-05-18T16:09:56Z")

</div>

gems: rspec (1.2.6) rspec-rails (1.2.6) cucumber (0.3.4, 0.3.2) webrat (0.4.4) Just got my new machine (I’m learning rails, im a front end designer). pulled a repo that we’ve been working on to run rake and get sta…

---

## [REG: Colour setting for html logs](https://www.ruby-forum.com/t/reg-colour-setting-for-html-logs/168210)

<div class="topic-metadata">

**Author:** [@anilg](https://www.ruby-forum.com/u/anilg)\
**Replies:** 2\
**Last updated:** [May 18, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/reg-colour-setting-for-html-logs/168210 "2009-05-18T13:57:22Z")

</div>

Hi, When i run some testcases using cucumber sample.feature --format html\>features.html. After execution, By default in the html file, background colour is black. How can i set the background color any other colour…

---

## [Rails HTML error page in the console](https://www.ruby-forum.com/t/rails-html-error-page-in-the-console/167854)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 4\
**Last updated:** [May 17, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/rails-html-error-page-in-the-console/167854 "2009-05-17T19:23:20Z")

</div>

I’m still bugged by the fact that when I get an exception during a feature run (e.g. Couldn’t find partial) then what I see in the console is all the HTML to report that error in a browser. I have had a few ideas for …

---

## [Can I run the same specs with different gems? Ideas?](https://www.ruby-forum.com/t/can-i-run-the-same-specs-with-different-gems-ideas/168095)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 3\
**Last updated:** [May 17, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/can-i-run-the-same-specs-with-different-gems-ideas/168095 "2009-05-17T18:02:26Z")

</div>

I have a new icalendar Ruby library/gem which is implemented so as require an implementation of the TZInfo::Timezone class, but not to care whether that implementation comes from the tzinfo gem, or the activesupport g…

---

## [Features running in development mode](https://www.ruby-forum.com/t/features-running-in-development-mode/168151)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 1\
**Last updated:** [May 16, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/features-running-in-development-mode/168151 "2009-05-16T23:43:44Z")

</div>

Hi, On my Rails app, when I run ‘rake features’, it runs it in development mode. Which is weird. And messes up my development database. What can I do to force it to run in test mode? Joe

---

## [Cucumber broke my rake tasks! 0.3.5](https://www.ruby-forum.com/t/cucumber-broke-my-rake-tasks-0-3-5/168062)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 5\
**Last updated:** [May 16, 2009, 8:42pm UTC](https://www.ruby-forum.com/t/cucumber-broke-my-rake-tasks-0-3-5/168062 "2009-05-16T20:42:05Z")

</div>

Seem to be having a problem with the new releases 0.3.5 which completely breaks my rake tasks cucumber.rake · GitHub. WIth the t.fork = true # Explicitly fork for cucumber 0.3.4 and rails lines added to the tasks non…

---

## [\[ANN\] rSquery 0.1.1](https://www.ruby-forum.com/t/ann-rsquery-0-1-1/196961)

<div class="topic-metadata">

**Author:** [@Ivo\_D](https://www.ruby-forum.com/u/Ivo_D)\
**Replies:** 2\
**Last updated:** [May 16, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/ann-rsquery-0-1-1/196961 "2009-05-16T18:12:37Z")

</div>

Hello all rSquery aims to reduce the difficulties involved in writing selenium tests in cucumber environments for webapps that use jQuery. The project contains several methods to help you with writing javascript comm…

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

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