# RSpec

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

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

---

## [Help with global before behavior](https://www.ruby-forum.com/t/help-with-global-before-behavior/167523)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 3\
**Last updated:** [May 9, 2009, 7:34am UTC](https://www.ruby-forum.com/t/help-with-global-before-behavior/167523 "2009-05-09T07:34:27Z")

</div>

I’m having a devil of a time getting some global before behavior to work the way I think it should. I have a set of controllers that are used only by administrative users, so login is required. To run examples just a…

---

## [Rspec\_scaffold and mocha](https://www.ruby-forum.com/t/rspec-scaffold-and-mocha/167437)

<div class="topic-metadata">

**Author:** [@jevado](https://www.ruby-forum.com/u/jevado)\
**Replies:** 2\
**Last updated:** [May 9, 2009, 6:13am UTC](https://www.ruby-forum.com/t/rspec-scaffold-and-mocha/167437 "2009-05-09T06:13:43Z")

</div>

Hi All, I have a question about the rspec\_scaffold and if it’s compatible with other mocking frameworks. I just created a blank application and a scaffold of a very basic model. The specs run fine untill I choose to …

---

## [Add comments to cucumber text features?](https://www.ruby-forum.com/t/add-comments-to-cucumber-text-features/167506)

<div class="topic-metadata">

**Author:** [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Replies:** 1\
**Last updated:** [May 8, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/add-comments-to-cucumber-text-features/167506 "2009-05-08T17:05:49Z")

</div>

Hi all, Often I find myself wishing there was a way to add comments to cucumber text features that are ignored by the parser. Is this possible somehow? Thanks! Ingo

---

## [Where to spec authentication and roles-based permissions?](https://www.ruby-forum.com/t/where-to-spec-authentication-and-roles-based-permissions/167487)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 3\
**Last updated:** [May 8, 2009, 3:39pm UTC](https://www.ruby-forum.com/t/where-to-spec-authentication-and-roles-based-permissions/167487 "2009-05-08T15:39:35Z")

</div>

Hi – I’m writing an app that both requires authentication via a logon, and also has roles-based permissions (using acl\_system2), and was wondering where to verify that both are happening. I’ve started out putting the…

---

## [Taza with Flex](https://www.ruby-forum.com/t/taza-with-flex/167485)

<div class="topic-metadata">

**Author:** [@shaik\_shaik](https://www.ruby-forum.com/u/shaik_shaik)\
**Replies:** 1\
**Last updated:** [May 8, 2009, 10:26am UTC](https://www.ruby-forum.com/t/taza-with-flex/167485 "2009-05-08T10:26:23Z")

</div>

Hello, Can somebody help me out in how to use Taza framework with Flex applications? Following is the script to perform operations on Flex application, please let me know how to do the same with Taza frame work: requ…

---

## [\[cucumber\] Multi-line Step Arguments](https://www.ruby-forum.com/t/cucumber-multi-line-step-arguments/167457)

<div class="topic-metadata">

**Author:** [@keith\_shaw](https://www.ruby-forum.com/u/keith_shaw)\
**Replies:** 3\
**Last updated:** [May 7, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/cucumber-multi-line-step-arguments/167457 "2009-05-07T23:11:26Z")

</div>

Hey All, I am trying to set up cucumber to use the multiline step argument. I have my test posted here : podPackage.feature · GitHub. I am currently using cucumber version 0.2.3. When I run the test the browser o…

---

## [\[RSpec\] implicit receiver for should problem when helper predicate methods are in use](https://www.ruby-forum.com/t/rspec-implicit-receiver-for-should-problem-when-helper-predicate-methods-are-in-use/167447)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 1\
**Last updated:** [May 7, 2009, 11:03pm UTC](https://www.ruby-forum.com/t/rspec-implicit-receiver-for-should-problem-when-helper-predicate-methods-are-in-use/167447 "2009-05-07T23:03:14Z")

</div>

I just upgraded RSpec and noticed that some of my specs started to fail and it is caused by the 1.1.2 update where implicit receiver for should is introduced. Here is one sample example group, which works with older …

---

## [Mocha and rspec\_scaffold](https://www.ruby-forum.com/t/mocha-and-rspec-scaffold/167434)

<div class="topic-metadata">

**Author:** [@jevado](https://www.ruby-forum.com/u/jevado)\
**Replies:** 1\
**Last updated:** [May 7, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/mocha-and-rspec-scaffold/167434 "2009-05-07T22:15:39Z")

</div>

Hi All, I’m busy experimenting with RSpec and encountered a small issue with the scaffolding. As soon as I chooce mocha as my mocking framework in the spec helper the specs created with rspec\_scaffold fail. Is this a…

---

## [Features failing to run correctly under 0.3.2](https://www.ruby-forum.com/t/features-failing-to-run-correctly-under-0-3-2/167325)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 11\
**Last updated:** [May 7, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/features-failing-to-run-correctly-under-0-3-2/167325 "2009-05-07T21:30:51Z")

</div>

Having significant problems getting an upto date environment with cucumber and rspec since 0.3.0. I have put the relevant files including a backtrace in a gist 107586’s gists · GitHub. I’d really appreciate it if so…

---

## [Top posting and plain text](https://www.ruby-forum.com/t/top-posting-and-plain-text/167337)

<div class="topic-metadata">

**Author:** [@aslakhellesoy](https://www.ruby-forum.com/u/aslakhellesoy)\
**Replies:** 10\
**Last updated:** [May 7, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/top-posting-and-plain-text/167337 "2009-05-07T21:30:50Z")

</div>

Folks, I find it really hard to follow conversations that use top posting ( Posting style - Wikipedia). If you have a \[Cucumber\] topic, please respond with inline comments. And use plain text email - not html. Than…

---

## [Cucumber - wierd button pressing error](https://www.ruby-forum.com/t/cucumber-wierd-button-pressing-error/167165)

<div class="topic-metadata">

**Author:** [@kwe](https://www.ruby-forum.com/u/kwe)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 11:46pm UTC](https://www.ruby-forum.com/t/cucumber-wierd-button-pressing-error/167165 "2009-05-06T23:46:15Z")

</div>

I wonder if anyone has some clues as to what is happening in the following… Output from running the feature… Quote\>\> Scenario: Create an Order Given I’m viewing the Rubber Duck product When I press “Add to cart” T…

---

## [DB transactions w/ RSpec](https://www.ruby-forum.com/t/db-transactions-w-rspec/167247)

<div class="topic-metadata">

**Author:** [@Francis\_H](https://www.ruby-forum.com/u/Francis_H)\
**Replies:** 4\
**Last updated:** [May 6, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/db-transactions-w-rspec/167247 "2009-05-06T22:06:30Z")

</div>

Sorry if this has been answered elsewhere, Google was not very helpful to me on this one. If I’m running a model spec and am one of those benighted souls who wants to hit the DB while doing so, is there a way for me t…

---

## [\[cucumber\] How to DRY up table data that I'm seeing across tests?](https://www.ruby-forum.com/t/cucumber-how-to-dry-up-table-data-that-im-seeing-across-tests/167334)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 5\
**Last updated:** [May 6, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/cucumber-how-to-dry-up-table-data-that-im-seeing-across-tests/167334 "2009-05-06T21:03:41Z")

</div>

I have the following step that I want to re-use in several scenarios. It looks like this: When I submit the form |form\_field\_id |value| |billingAddress.email |removed\_email\_address@domain.invali…

---

## [Extending RSpec- Best Practices?](https://www.ruby-forum.com/t/extending-rspec-best-practices/167300)

<div class="topic-metadata">

**Author:** [@Nicholas\_Van\_W](https://www.ruby-forum.com/u/Nicholas_Van_W)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/extending-rspec-best-practices/167300 "2009-05-06T20:46:04Z")

</div>

Hi, I’m reading the RSpec book and it makes references to macros from shoulda and rspec\_on\_rail\_on\_crack, but doesn’t integrate them, simply describing how to write your own macro. I see there is the “Remarkable” pr…

---

## [Have\_selector only matching immediate descendants in block](https://www.ruby-forum.com/t/have-selector-only-matching-immediate-descendants-in-block/167304)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 2\
**Last updated:** [May 6, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/have-selector-only-matching-immediate-descendants-in-block/167304 "2009-05-06T18:28:43Z")

</div>

Hi – I have an expectation that looks like this: it “should display a field for the username” do do\_render response.should have\_selector( “form” ) do |form| form.should have\_selector( “input”, :name =\> “username” ) …

---

## [Cucunber - does not honour here-document syntax?](https://www.ruby-forum.com/t/cucunber-does-not-honour-here-document-syntax/167309)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 2\
**Last updated:** [May 6, 2009, 5:52pm UTC](https://www.ruby-forum.com/t/cucunber-does-not-honour-here-document-syntax/167309 "2009-05-06T17:52:47Z")

</div>

something\_steps.rb TEST = ‘A constant’ puts TEST SCRIPT \<\<-‘END\_SCRIPT’ … END\_SCRIPT Then /…/ do $ cucumber -r features features/lib/something.feature A constant ./features/lib/step\_definitions/something\_\_steps.…

---

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

<div class="topic-metadata">

**Author:** [@Matthew\_Van\_Horn](https://www.ruby-forum.com/u/Matthew_Van_Horn)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 3:59pm UTC](https://www.ruby-forum.com/t/cucumber-segfaults/167301 "2009-05-06T15:59:36Z")

</div>

Just started getting this, every time I run rake features: myapp/vendor/rails/actionpack/lib/action\_controller/vendor/rack-1.0/ rack/lint.rb:16: \[BUG\] Segmentation fault ruby 1.8.6 (2008-03-03) \[i686-darwin9.2.2\] aft…

---

## [Cucumber - when to stub/mock](https://www.ruby-forum.com/t/cucumber-when-to-stub-mock/167107)

<div class="topic-metadata">

**Author:** [@Matthew\_Van\_Horn](https://www.ruby-forum.com/u/Matthew_Van_Horn)\
**Replies:** 9\
**Last updated:** [May 5, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/cucumber-when-to-stub-mock/167107 "2009-05-05T19:33:43Z")

</div>

I’m just curious about this, since my solution involved stubbing a call to GeoIp. Is there a good rule of thumb for when you make exceptions to the ‘no stubbing’ philosophy of Cucumber? My step was: “Given I am acces…

---

## [Using Rails observers and testability](https://www.ruby-forum.com/t/using-rails-observers-and-testability/167130)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 4\
**Last updated:** [May 5, 2009, 5:03pm UTC](https://www.ruby-forum.com/t/using-rails-observers-and-testability/167130 "2009-05-05T17:03:41Z")

</div>

Hi, Before I do anything stupid, I’d like to know if there are any gotchas when using Rails observers instead of writing my own methods or callbacks? Are they easy to spec/test or will I run into troubles? Are they e…

---

## [\[cucumber\] Bug introduced in 0.3.1](https://www.ruby-forum.com/t/cucumber-bug-introduced-in-0-3-1/166896)

<div class="topic-metadata">

**Author:** [@leemhenson](https://www.ruby-forum.com/u/leemhenson)\
**Replies:** 5\
**Last updated:** [May 5, 2009, 4:32pm UTC](https://www.ruby-forum.com/t/cucumber-bug-introduced-in-0-3-1/166896 "2009-05-05T16:32:27Z")

</div>

Hi All, I’m new to the list, but a happy cucumber user with a few weeks experience now… a bit of a shock this morning when someone upgraded here and happened to jump up to 0.3.1, we’re seeing the following output… I…

---

## [\[Cucumber\] undefined method \`record' for #\<Class:0x2473e3c\> (NoMethodError)](https://www.ruby-forum.com/t/cucumber-undefined-method-record-for-class-0x2473e3c-nomethoderror/167183)

<div class="topic-metadata">

**Author:** [@jfrankov](https://www.ruby-forum.com/u/jfrankov)\
**Replies:** 1\
**Last updated:** [May 5, 2009, 7:47am UTC](https://www.ruby-forum.com/t/cucumber-undefined-method-record-for-class-0x2473e3c-nomethoderror/167183 "2009-05-05T07:47:36Z")

</div>

I have a step definition file where I’m saving a model object and want to use this syntax (it’s common, I see it in examples everywhere): Event.should have(1).record …but it gives this error: undefined method \`record…

---

## [Cucumber - how to bootstrap outside of rails?](https://www.ruby-forum.com/t/cucumber-how-to-bootstrap-outside-of-rails/167018)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 14\
**Last updated:** [May 4, 2009, 7:39am UTC](https://www.ruby-forum.com/t/cucumber-how-to-bootstrap-outside-of-rails/167018 "2009-05-04T07:39:01Z")

</div>

Setting up cucumber inside a Rails project is no more difficult than running script/generate cucumber. But what does one do when working without Rails at all? How do you generate the features tree and all of its def…

---

## [\[cucumber\] Assertions about current location in Then steps](https://www.ruby-forum.com/t/cucumber-assertions-about-current-location-in-then-steps/167104)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 2\
**Last updated:** [May 4, 2009, 4:09am UTC](https://www.ruby-forum.com/t/cucumber-assertions-about-current-location-in-then-steps/167104 "2009-05-04T04:09:27Z")

</div>

Hello, is there currently a way to make assertions about the current location in Then steps? Here’s an example of what I would like to do: Scenario: Creating a post Given I am on the the posts page When I fill in … …

---

## [\[Cucumber\] gem missing dependencies](https://www.ruby-forum.com/t/cucumber-gem-missing-dependencies/166507)

<div class="topic-metadata">

**Author:** [@Kero\_van\_Gelder](https://www.ruby-forum.com/u/Kero_van_Gelder)\
**Replies:** 7\
**Last updated:** [May 4, 2009, 12:22am UTC](https://www.ruby-forum.com/t/cucumber-gem-missing-dependencies/166507 "2009-05-04T00:22:31Z")

</div>

Hi! Looks like installing hoe (which brings in rubyforge and rake) solved the problem below. Who builds the gem / should I report this to / should I send a patch ? Bye, Kero. fresh install of debian lenny, upgrade…

---

## [\[rspec\]. Inexplicable error in simple specs](https://www.ruby-forum.com/t/rspec-inexplicable-error-in-simple-specs/167069)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 2\
**Last updated:** [May 3, 2009, 3:42pm UTC](https://www.ruby-forum.com/t/rspec-inexplicable-error-in-simple-specs/167069 "2009-05-03T15:42:52Z")

</div>

Hello. I am having strange errors running some specs. I have just installed the nifty\_scaffolds gem from Ryan B., and ran “script/generate nifty\_authentication --rspec --haml”, I have prepared the databases, and run …

---

## [DRB errors running rake pre\_commit](https://www.ruby-forum.com/t/drb-errors-running-rake-pre-commit/167030)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 2\
**Last updated:** [May 3, 2009, 12:56pm UTC](https://www.ruby-forum.com/t/drb-errors-running-rake-pre-commit/167030 "2009-05-03T12:56:59Z")

</div>

Hi list, I checked out the rspec-dev repository on a MBP (Leopard) and tried to run the pre\_commit task after going through the setup/configuration steps on http://wiki.github.com/dchelimsky/rspec/contribute. I’m get…

---

## [\[Cucumber\] Using Cucumber to test Erlang servers directly](https://www.ruby-forum.com/t/cucumber-using-cucumber-to-test-erlang-servers-directly/167021)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 3\
**Last updated:** [May 3, 2009, 10:27am UTC](https://www.ruby-forum.com/t/cucumber-using-cucumber-to-test-erlang-servers-directly/167021 "2009-05-03T10:27:38Z")

</div>

I don’t know if this will interest anyone, but I thought it was a pretty cool use of Cucumber :slight\_smile: I’ve posted a Blog article on how I use Cucumber to test an Erlang Server directly by talking to my Erlang N…

---

## [Cucumber - Testing ActionMailer](https://www.ruby-forum.com/t/cucumber-testing-actionmailer/166619)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 7\
**Last updated:** [May 3, 2009, 6:10am UTC](https://www.ruby-forum.com/t/cucumber-testing-actionmailer/166619 "2009-05-03T06:10:12Z")

</div>

I need some help with this. I have installed email-spec (courtesy of BMabey) and I have configure things thusly: Scenario: E-Mail Exchange Rates to notify parties Given a currency exchange feed from the Bank of Canad…

---

## [RSpecers point of view about how to create rails association](https://www.ruby-forum.com/t/rspecers-point-of-view-about-how-to-create-rails-association/167040)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 3\
**Last updated:** [May 3, 2009, 3:32am UTC](https://www.ruby-forum.com/t/rspecers-point-of-view-about-how-to-create-rails-association/167040 "2009-05-03T03:32:45Z")

</div>

Hi, Using Ruby on Rails, let’s says I have an Article model and Comment model. An Article has\_many :comments, Using Rais idiom, one would do something like that in the comments\_controller/create: @article = Article.…

---

## [\[ANN\] rspec 1.2.6 Released](https://www.ruby-forum.com/t/ann-rspec-1-2-6-released/166938)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 2\
**Last updated:** [May 2, 2009, 1:58pm UTC](https://www.ruby-forum.com/t/ann-rspec-1-2-6-released/166938 "2009-05-02T13:58:14Z")

</div>

rspec version 1.2.6 has been released! Behaviour Driven Development for Ruby. Changes: Version 1.2.6 / 2009-04-30 bug fixes gem actually built with spec executable http://rspec.info http://rubyforge.org/pro…

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

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