# RSpec

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

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

---

## [RSpec Formats with Strange Characters](https://www.ruby-forum.com/t/rspec-formats-with-strange-characters/164746)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 2\
**Last updated:** [April 5, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/rspec-formats-with-strange-characters/164746 "2009-04-05T16:47:53Z")

</div>

Hi, Sorry for another post. I have spec.opts writing certain formats to certain files. It looks like this: –colour –format progress –format nested:doc/nested.txt –format profile:doc/profile.txt –loadby mtime –re…

---

## [Phlip's be\_html\_with was RE: Problem with Custom matcher and Blocks](https://www.ruby-forum.com/t/phlips-be-html-with-was-re-problem-with-custom-matcher-and-blocks/164703)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 10\
**Last updated:** [April 5, 2009, 1:18pm UTC](https://www.ruby-forum.com/t/phlips-be-html-with-was-re-problem-with-custom-matcher-and-blocks/164703 "2009-04-05T13:18:48Z")

</div>

Hi, I just found a custom matcher created by Phlip at So I added that to my project, and it mostly works great for what I’m trying to do, and the syntax is pretty nice. But anytime I try to use select, I get an err…

---

## [Problems installing the rspec and rspec-rails gems](https://www.ruby-forum.com/t/problems-installing-the-rspec-and-rspec-rails-gems/164739)

<div class="topic-metadata">

**Author:** [@vh1](https://www.ruby-forum.com/u/vh1)\
**Replies:** 3\
**Last updated:** [April 5, 2009, 5:12am UTC](https://www.ruby-forum.com/t/problems-installing-the-rspec-and-rspec-rails-gems/164739 "2009-04-05T05:12:02Z")

</div>

Hello, Just purchased my first mac for Ruby on Rails development and I’m in the process of setting up the environment and installing rspec and rspec-rails. I’m getting the following error message when trying to insta…

---

## [Problem with Custom matcher and Blocks](https://www.ruby-forum.com/t/problem-with-custom-matcher-and-blocks/164517)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 8\
**Last updated:** [April 4, 2009, 4:24am UTC](https://www.ruby-forum.com/t/problem-with-custom-matcher-and-blocks/164517 "2009-04-04T04:24:15Z")

</div>

Hi, I’m trying to write my first custom matcher. Here’s a bit of my example group. describe “/contact/index” do include FormMatchers before(:each) do render ‘contact/index’ end it “should show the contact form” d…

---

## [Running cucumber distributed across hardware](https://www.ruby-forum.com/t/running-cucumber-distributed-across-hardware/149262)

<div class="topic-metadata">

**Author:** [@bryan123](https://www.ruby-forum.com/u/bryan123)\
**Replies:** 12\
**Last updated:** [April 3, 2009, 11:55pm UTC](https://www.ruby-forum.com/t/running-cucumber-distributed-across-hardware/149262 "2009-04-03T23:55:04Z")

</div>

At my job, our story suite contains over 500 scenarios. While we’re very happy with the regressions we’ve caught by running the suite, the long time it takes (~ 10+ minutes) is starting to lead to developers checking …

---

## [\[ANN\] BDD w/Rails class in June](https://www.ruby-forum.com/t/ann-bdd-w-rails-class-in-june/196928)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/ann-bdd-w-rails-class-in-june/196928 "2009-04-03T20:33:36Z")

</div>

I apologize in advanced if this seems like a shameless plug, but it feels like an appropriate place to announce it. The first week of June I’m going to teaching a class on BDD w/Rails in sunny west Michigan: Announcem…

---

## [Rspec 1.2.2 unpacking](https://www.ruby-forum.com/t/rspec-1-2-2-unpacking/164595)

<div class="topic-metadata">

**Author:** [@pallan](https://www.ruby-forum.com/u/pallan)\
**Replies:** 3\
**Last updated:** [April 3, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/rspec-1-2-2-unpacking/164595 "2009-04-03T19:15:07Z")

</div>

Hello all, I am trying to unpack rspec 1.2.2 and rspec-rails 1.2.2 into my application. I have them included in the test.rb environment file with config.gem options as described on the Rspec github site. I can unpa…

---

## [Re: RSpec makes me want to write better code](https://www.ruby-forum.com/t/re-rspec-makes-me-want-to-write-better-code/164638)

<div class="topic-metadata">

**Author:** [@Chuck\_van\_der\_Linde](https://www.ruby-forum.com/u/Chuck_van_der_Linde)\
**Replies:** 0\
**Last updated:** [April 3, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/re-rspec-makes-me-want-to-write-better-code/164638 "2009-04-03T15:48:13Z")

</div>

dammit me be moron, forgot to edit subject

---

## [Thought on a quality metric for Cucumber test suites](https://www.ruby-forum.com/t/thought-on-a-quality-metric-for-cucumber-test-suites/164605)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 1:21am UTC](https://www.ruby-forum.com/t/thought-on-a-quality-metric-for-cucumber-test-suites/164605 "2009-04-03T01:21:43Z")

</div>

Writing another post to Zach I had a thought about a quality metric for Cucumber suites: Ratio of #steps executed / #step matchers For example, if you can run 100 steps with only 10 step matchers, you have a nice low …

---

## [\[cucumber\] How to add a after failure hook?](https://www.ruby-forum.com/t/cucumber-how-to-add-a-after-failure-hook/164509)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 4\
**Last updated:** [April 2, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/cucumber-how-to-add-a-after-failure-hook/164509 "2009-04-02T20:19:53Z")

</div>

Is currently a way to add a upon failure hook? I’d like to make it so that, in the event of a failed assertion, Webrat will take the last requested page and open it in a browser. Thanks :slight\_smile: Tim

---

## [Re: Autospec stops running after tests are complete](https://www.ruby-forum.com/t/re-autospec-stops-running-after-tests-are-complete/164477)

<div class="topic-metadata">

**Author:** [@rosentraterds](https://www.ruby-forum.com/u/rosentraterds)\
**Replies:** 2\
**Last updated:** [April 1, 2009, 11:03pm UTC](https://www.ruby-forum.com/t/re-autospec-stops-running-after-tests-are-complete/164477 "2009-04-01T23:03:51Z")

</div>

I’m thinking now the problem may be ZenTest 4.0. I reverted back to 3.11 and it was working there. But 3.11 has conflicts with Rails 2.3.2 and I need to run rails. Still need help if anybody has some for me. Thanks …

---

## [Autospec stops running after tests are complete](https://www.ruby-forum.com/t/autospec-stops-running-after-tests-are-complete/164474)

<div class="topic-metadata">

**Author:** [@rosentraterds](https://www.ruby-forum.com/u/rosentraterds)\
**Replies:** 0\
**Last updated:** [April 1, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/autospec-stops-running-after-tests-are-complete/164474 "2009-04-01T20:12:19Z")

</div>

I installed an app template into an existing rails install. In the process I upgraded to RSpec 1.2.2 and I’m running Rails 2.3.2. Now autospec will run once and then exit. Returning me to the CLI prompt. Any ideas? …

---

## [Ticket 44](https://www.ruby-forum.com/t/ticket-44/164470)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 0\
**Last updated:** [April 1, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/ticket-44/164470 "2009-04-01T19:15:49Z")

</div>

Hi, Ticket 44 is resolved, I am using 0.2.3 and attempting to throw the html upon a failure Before do |scenario| @sc = scenario end After do puts @sc.methods.sort throw $browser.html @sc.failed? end Have these …

---

## [Good introduction to rspec](https://www.ruby-forum.com/t/good-introduction-to-rspec/164386)

<div class="topic-metadata">

**Author:** [@Pablo\_LSde\_Miranda](https://www.ruby-forum.com/u/Pablo_LSde_Miranda)\
**Replies:** 15\
**Last updated:** [April 1, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/good-introduction-to-rspec/164386 "2009-04-01T19:02:35Z")

</div>

Hi guys, Someone know some good introduction to rspec, I\`m wanting to use Rspec with my Rails projects, but I don’t found a good introduction. Att, Pablo Lacerda de Miranda removed\_email\_address@domain.invalid

---

## [\[Cucumber\] Running single feature from command line](https://www.ruby-forum.com/t/cucumber-running-single-feature-from-command-line/164361)

<div class="topic-metadata">

**Author:** [@lamplighter](https://www.ruby-forum.com/u/lamplighter)\
**Replies:** 7\
**Last updated:** [April 1, 2009, 12:39am UTC](https://www.ruby-forum.com/t/cucumber-running-single-feature-from-command-line/164361 "2009-04-01T00:39:54Z")

</div>

I am using Cucumber 0.2.3 and am having problems running a single feature. In particular, the cucumber Textmate bundle was not working so I traced it back and discovered that I could not run single files or features f…

---

## [Expecting nil or false](https://www.ruby-forum.com/t/expecting-nil-or-false/164381)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 8\
**Last updated:** [April 1, 2009, 12:07am UTC](https://www.ruby-forum.com/t/expecting-nil-or-false/164381 "2009-04-01T00:07:10Z")

</div>

Hi, I just ran into this issue. I have a method that returns: false, true, nil or an object. This method is used by another method to test for true/false. In Ruby that’s easy to handle as nil and false evaluate to fa…

---

## [Getting the file a scenario is defined in (Cucumber)](https://www.ruby-forum.com/t/getting-the-file-a-scenario-is-defined-in-cucumber/164357)

<div class="topic-metadata">

**Author:** [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Replies:** 1\
**Last updated:** [March 31, 2009, 5:09pm UTC](https://www.ruby-forum.com/t/getting-the-file-a-scenario-is-defined-in-cucumber/164357 "2009-03-31T17:09:47Z")

</div>

In Cucumber… Is there a simple way to find out what file a scenario is defined in? I’d like to use this information to load a set of fixtures depending on which feature is being run. So if I’m running the ‘login.feat…

---

## [\[Cucumber\] World { nil } causes undefined method \`exception=' in backtraces from steps called from o](https://www.ruby-forum.com/t/cucumber-world-nil-causes-undefined-method-exception-in-backtraces-from-steps-called-from-o/164348)

<div class="topic-metadata">

**Author:** [@jcain](https://www.ruby-forum.com/u/jcain)\
**Replies:** 2\
**Last updated:** [March 31, 2009, 1:12pm UTC](https://www.ruby-forum.com/t/cucumber-world-nil-causes-undefined-method-exception-in-backtraces-from-steps-called-from-o/164348 "2009-03-31T13:12:09Z")

</div>

We were using the following style of setting up a world: World do def a\_helper … end end I don’t know where I came up with that. I now realise we should have been returning a world class here, but the above style …

---

## [\[Cucumber\] Bug with background](https://www.ruby-forum.com/t/cucumber-bug-with-background/164249)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 2\
**Last updated:** [March 31, 2009, 11:46am UTC](https://www.ruby-forum.com/t/cucumber-bug-with-background/164249 "2009-03-31T11:46:29Z")

</div>

Seem to be getting a problem when running a feature with background. Running the whole file works fine however running an individual feature fails. The background steps are Background: Given an admin user Philip ex…

---

## [\[Cucumber\] autotest+growl or similar?](https://www.ruby-forum.com/t/cucumber-autotest-growl-or-similar/164316)

<div class="topic-metadata">

**Author:** [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Replies:** 0\
**Last updated:** [March 31, 2009, 5:39am UTC](https://www.ruby-forum.com/t/cucumber-autotest-growl-or-similar/164316 "2009-03-31T05:39:36Z")

</div>

I’ve got autotest 4.0.0 working with Cucumber 0.2.3 by following the Autotest Integration instructions in the wiki. But I can’t figure out a way to get automatically notified of the results, via growl or anything el…

---

## [Variable argument matchers for Cucumber](https://www.ruby-forum.com/t/variable-argument-matchers-for-cucumber/164279)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 3\
**Last updated:** [March 31, 2009, 1:37am UTC](https://www.ruby-forum.com/t/variable-argument-matchers-for-cucumber/164279 "2009-03-31T01:37:54Z")

</div>

List, Given a Cucumber script like Then /^the (?:(first|second|third|fourth) line of the )?(.) section of the (.) should be (.\*)$/ do |\*args| #… end Cucumber errors with expected 0 block argument(s), got 4 (Cucumb…

---

## [Cucumber step definitions vs. RSpec examples](https://www.ruby-forum.com/t/cucumber-step-definitions-vs-rspec-examples/164135)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 8\
**Last updated:** [March 30, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/cucumber-step-definitions-vs-rspec-examples/164135 "2009-03-30T23:33:50Z")

</div>

Hi, So, I’m confused. I’ve been trying to use Cucumber and RSpec, but step definitions and RSpec examples just seem to be overlapping. What should go in either one of these? For instance, let’s say I’m testing if a …

---

## [\[Rails\] specifying that a layout yields?](https://www.ruby-forum.com/t/rails-specifying-that-a-layout-yields/164185)

<div class="topic-metadata">

**Author:** [@Brandt\_Kurowski](https://www.ruby-forum.com/u/Brandt_Kurowski)\
**Replies:** 4\
**Last updated:** [March 30, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/rails-specifying-that-a-layout-yields/164185 "2009-03-30T18:58:40Z")

</div>

I recently had a bug in a layout due to the layout not calling “yield” to display the actual content. I wanted to write a spec to describe what was missing, but it wasn’t obvious how, so I just fixed the problem first…

---

## [Autospec fails but rake spec tasks pass](https://www.ruby-forum.com/t/autospec-fails-but-rake-spec-tasks-pass/164186)

<div class="topic-metadata">

**Author:** [@jakepaul](https://www.ruby-forum.com/u/jakepaul)\
**Replies:** 4\
**Last updated:** [March 30, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/autospec-fails-but-rake-spec-tasks-pass/164186 "2009-03-30T18:53:59Z")

</div>

I can’t figure out what is causing this problem. I’m using the latest rspec and rspec-rails gems on rails 2.3.2. When I run autospec, the tests in the model spec that I am editing will all fail. The error messages a…

---

## [\[Cucumber\] ANN: Cucumber 0.2.3](https://www.ruby-forum.com/t/cucumber-ann-cucumber-0-2-3/164263)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 0\
**Last updated:** [March 30, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/cucumber-ann-cucumber-0-2-3/164263 "2009-03-30T17:15:59Z")

</div>

http://github.com/aslakhellesoy/cucumber/blob/142b1618616ca688308d4ddd7fa3203bc0f435a0/History.txt Enjoy! Aslak

---

## [RSpec-rails 1.2.2: autospec passes but "rake spec" fails](https://www.ruby-forum.com/t/rspec-rails-1-2-2-autospec-passes-but-rake-spec-fails/163881)

<div class="topic-metadata">

**Author:** [@tadatoshi](https://www.ruby-forum.com/u/tadatoshi)\
**Replies:** 15\
**Last updated:** [March 30, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/rspec-rails-1-2-2-autospec-passes-but-rake-spec-fails/163881 "2009-03-30T15:26:29Z")

</div>

Hi, I started to use RSpec and RSpec-rails 1.2.0 last week when I upgraded to Ruby on Rails 2.3.2. At that time, “ruby script/generate rspec” hang but autospec and “rake spec” were successful. Yesterday, I updated…

---

## [What is the context?](https://www.ruby-forum.com/t/what-is-the-context/164224)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [March 30, 2009, 7:05am UTC](https://www.ruby-forum.com/t/what-is-the-context/164224 "2009-03-30T07:05:10Z")

</div>

describe MovieList do context “when first created” do it “should be empty” do movie\_list = MovieList.new movie\_list.should be\_empty end end end what is the context work for?

---

## [\[Cucumber\] Stack trace in HTML](https://www.ruby-forum.com/t/cucumber-stack-trace-in-html/164203)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 1\
**Last updated:** [March 29, 2009, 11:00pm UTC](https://www.ruby-forum.com/t/cucumber-stack-trace-in-html/164203 "2009-03-29T23:00:33Z")

</div>

Hi, Is the stack trace not in the HTML by design? Aidy

---

## [Flash.now](https://www.ruby-forum.com/t/flash-now/164121)

<div class="topic-metadata">

**Author:** [@hayafirst](https://www.ruby-forum.com/u/hayafirst)\
**Replies:** 2\
**Last updated:** [March 29, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/flash-now/164121 "2009-03-29T18:36:59Z")

</div>

Hi, How can I test flash.now\[:key\] is being set in a controller test? Both flash\[:key\] and flash.now\[:key\].should == message didn’t work I can use response.session\[“flash”\]\[:key\].should == message . Just looks bad T…

---

## [\[Cucumber\]\[email-spec\] Testing Incoming Email with email-spec](https://www.ruby-forum.com/t/cucumber-email-spec-testing-incoming-email-with-email-spec/164049)

<div class="topic-metadata">

**Author:** [@mischa](https://www.ruby-forum.com/u/mischa)\
**Replies:** 0\
**Last updated:** [March 27, 2009, 8:54am UTC](https://www.ruby-forum.com/t/cucumber-email-spec-testing-incoming-email-with-email-spec/164049 "2009-03-27T08:54:12Z")

</div>

Hi, I’ve done some work for email-spec that allows you to quickly test incoming e-mail handling. Does any body else receive e-mail? If so, I would love your input/feedback, as I’m hoping this will eventually get me…

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

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