# RSpec

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

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

---

## [Problems when programmatically defining examples](https://www.ruby-forum.com/t/problems-when-programmatically-defining-examples/151235)

<div class="topic-metadata">

**Author:** [@mark42](https://www.ruby-forum.com/u/mark42)\
**Replies:** 4\
**Last updated:** [October 19, 2008, 3:24am UTC](https://www.ruby-forum.com/t/problems-when-programmatically-defining-examples/151235 "2008-10-19T03:24:41Z")

</div>

Hi, I am trying to code an application that is based on Rspec; I am programmatically building examples, and launching the runner with a custom formatter. Here are the code snippets from my app: Launching the runner: …

---

## [Any good conferences this year about ruby/rspec/watir?](https://www.ruby-forum.com/t/any-good-conferences-this-year-about-ruby-rspec-watir/151075)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 2\
**Last updated:** [October 18, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/any-good-conferences-this-year-about-ruby-rspec-watir/151075 "2008-10-18T15:31:31Z")

</div>

Hello. Sorry for this little offtopic question, but I was wondering if anyone happens to know if there’s any good conferences coming up about rspec or ruby or watir in this year where I could attend to? Or any good w…

---

## [Cucumber "standard base" setup?](https://www.ruby-forum.com/t/cucumber-standard-base-setup/151203)

<div class="topic-metadata">

**Author:** [@complete](https://www.ruby-forum.com/u/complete)\
**Replies:** 3\
**Last updated:** [October 18, 2008, 1:37pm UTC](https://www.ruby-forum.com/t/cucumber-standard-base-setup/151203 "2008-10-18T13:37:49Z")

</div>

I’m trying to set up cucumber so we can try it in some Ruby automation scripts I’m working on. These will be straight Ruby, for use in BBEdit and TextMate (on the Mac). NOT Rails. The big early-stage stumbling block …

---

## [Specifying a controller's layout](https://www.ruby-forum.com/t/specifying-a-controllers-layout/147712)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 12\
**Last updated:** [October 18, 2008, 6:44am UTC](https://www.ruby-forum.com/t/specifying-a-controllers-layout/147712 "2008-10-18T06:44:46Z")

</div>

I want to spec that a controller uses a particular layout how do I do that? cheers, Matt http://blog.mattwynne.net In case you wondered: The opinions expressed in this email are my own and do not necessarily refle…

---

## [Where are those tables listed for fixtures?](https://www.ruby-forum.com/t/where-are-those-tables-listed-for-fixtures/151185)

<div class="topic-metadata">

**Author:** [@crumb](https://www.ruby-forum.com/u/crumb)\
**Replies:** 9\
**Last updated:** [October 17, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/where-are-those-tables-listed-for-fixtures/151185 "2008-10-17T22:26:22Z")

</div>

I’m sorry if this is posted in wrong forum. I am new to all of this with rails and rspec. Something got messed up when I changed a table’s name from ‘works’ to ‘work\_periods’. Now the fixture:load thing does not work.…

---

## [How to test a controller](https://www.ruby-forum.com/t/how-to-test-a-controller/151130)

<div class="topic-metadata">

**Author:** [@manoah](https://www.ruby-forum.com/u/manoah)\
**Replies:** 3\
**Last updated:** [October 17, 2008, 9:26am UTC](https://www.ruby-forum.com/t/how-to-test-a-controller/151130 "2008-10-17T09:26:30Z")

</div>

I want to test the controllers of an existing project. How can i do it. Actually when I use ruby script/spec rspec\_scaffold modelname it creates a spec controller for that model and a controller inside the app folder. …

---

## [Mocking documentation](https://www.ruby-forum.com/t/mocking-documentation/151074)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 1\
**Last updated:** [October 17, 2008, 7:15am UTC](https://www.ruby-forum.com/t/mocking-documentation/151074 "2008-10-17T07:15:23Z")

</div>

Can I make a suggestion for the RSpec documentation? In the discussion of Spec::Mocks (http://rspec.info/documentation/mocks/), it would be helpful for there to be some explanation of mock\_model. There’s a reference t…

---

## [Just a quick question on David's new-controller-examples](https://www.ruby-forum.com/t/just-a-quick-question-on-davids-new-controller-examples/150949)

<div class="topic-metadata">

**Author:** [@codejoy](https://www.ruby-forum.com/u/codejoy)\
**Replies:** 3\
**Last updated:** [October 17, 2008, 12:44am UTC](https://www.ruby-forum.com/t/just-a-quick-question-on-davids-new-controller-examples/150949 "2008-10-17T00:44:13Z")

</div>

http://blog.davidchelimsky.net/2008/7/1/new-controller-examples BTW … great post, thanks :slight\_smile: I was wondering the thinking of this one … describe “responding to POST /accounts” do describe “with failed save…

---

## [How to spec accessing a constant](https://www.ruby-forum.com/t/how-to-spec-accessing-a-constant/151012)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 9\
**Last updated:** [October 16, 2008, 7:48am UTC](https://www.ruby-forum.com/t/how-to-spec-accessing-a-constant/151012 "2008-10-16T07:48:02Z")

</div>

Hi guys. One of my methods uses a constant in another method, like this: class A def something “foo: #{B::BAR}” end end When writing the spec for A#something , how would you mock or stub #{B::BAR}, and how would y…

---

## [Autotest with a non-rspec project](https://www.ruby-forum.com/t/autotest-with-a-non-rspec-project/148856)

<div class="topic-metadata">

**Author:** [@dan](https://www.ruby-forum.com/u/dan)\
**Replies:** 3\
**Last updated:** [October 16, 2008, 5:35am UTC](https://www.ruby-forum.com/t/autotest-with-a-non-rspec-project/148856 "2008-10-16T05:35:53Z")

</div>

Hello, I’m working on a contract that doesn’t use rspec. When I try and run autotest I get the following: loading autotest/rails\_rspec Autotest style autotest/rails\_rspec doesn’t seem to exist. Aborting. I uninstal…

---

## [Extend Cucumber's arguments](https://www.ruby-forum.com/t/extend-cucumbers-arguments/150969)

<div class="topic-metadata">

**Author:** [@aidy\_lewis](https://www.ruby-forum.com/u/aidy_lewis)\
**Replies:** 1\
**Last updated:** [October 15, 2008, 1:12pm UTC](https://www.ruby-forum.com/t/extend-cucumbers-arguments/150969 "2008-10-15T13:12:17Z")

</div>

Hi, We would like to pass in some additional command line arguments into Cucumber (for example to specify which browser to run the tests with). Is there any way to extend Cucumber’s arguments, or could you suggest an…

---

## [Rails config.gem and rspec, rspec-rails](https://www.ruby-forum.com/t/rails-config-gem-and-rspec-rspec-rails/150849)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 2\
**Last updated:** [October 15, 2008, 10:52am UTC](https://www.ruby-forum.com/t/rails-config-gem-and-rspec-rspec-rails/150849 "2008-10-15T10:52:11Z")

</div>

In rspec the instructions for installing rspec and rspec-rails on a Rails project. Specifically talking about the following line from config.gem “rspec-rails”, :lib =\> “spec” I think this should be updated to not ins…

---

## [How to play with rSpec using irb](https://www.ruby-forum.com/t/how-to-play-with-rspec-using-irb/150952)

<div class="topic-metadata">

**Author:** [@alr](https://www.ruby-forum.com/u/alr)\
**Replies:** 2\
**Last updated:** [October 15, 2008, 9:10am UTC](https://www.ruby-forum.com/t/how-to-play-with-rspec-using-irb/150952 "2008-10-15T09:10:49Z")

</div>

Hi, Is there any way to experiment with rSpec in irb or script/console session? Tried this: require ‘spec’ =\> true \[1,2,3\].should have(3).items =\> NoMethodError: undefined method \`have’ for main:Object from (…

---

## [\[cucumber\] Is it possbile to access scenario name in steps?](https://www.ruby-forum.com/t/cucumber-is-it-possbile-to-access-scenario-name-in-steps/150891)

<div class="topic-metadata">

**Author:** [@wei\_wei](https://www.ruby-forum.com/u/wei_wei)\
**Replies:** 2\
**Last updated:** [October 14, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/cucumber-is-it-possbile-to-access-scenario-name-in-steps/150891 "2008-10-14T21:24:13Z")

</div>

One of my examples now is like below case\_1001.feature Feature: case\_1001 Scenario: 10001 Given the network is CBS Given the data : Then there should be an asset with internal id and title1 in DB

---

## [Checking that a controller created a separate model object](https://www.ruby-forum.com/t/checking-that-a-controller-created-a-separate-model-object/150770)

<div class="topic-metadata">

**Author:** [@OSFrabjous-Dey](https://www.ruby-forum.com/u/OSFrabjous-Dey)\
**Replies:** 4\
**Last updated:** [October 14, 2008, 9:20pm UTC](https://www.ruby-forum.com/t/checking-that-a-controller-created-a-separate-model-object/150770 "2008-10-14T21:20:41Z")

</div>

Hi everyone, RSpec newbie here. I’m looking forward to interacting with the community as I learn more about TDD, RSpec, Rails, and… TDD through RSpec in Rails. Having watched the Peepcode screencasts and read a lot…

---

## [Re: Cucumber: Migrating RSpec Story L isteners to Cucumber](https://www.ruby-forum.com/t/re-cucumber-migrating-rspec-story-l-isteners-to-cucumber/150857)

<div class="topic-metadata">

**Author:** [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Replies:** 6\
**Last updated:** [October 14, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/re-cucumber-migrating-rspec-story-l-isteners-to-cucumber/150857 "2008-10-14T17:49:34Z")

</div>

No advice on that? Should i open a ticket on Lighthouse? I also would try to implement that… Thanks, Thomas -----Ursprüngliche Nachricht----- Von: “Thomas M.” removed\_email\_address@domain.invalid Gesendet: 09.10.…

---

## [Re: Cucumber: Migrating RSpec Story L isteners to	Cucumber](https://www.ruby-forum.com/t/re-cucumber-migrating-rspec-story-l-isteners-to-cucumber/150885)

<div class="topic-metadata">

**Author:** [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Replies:** 0\
**Last updated:** [October 14, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/re-cucumber-migrating-rspec-story-l-isteners-to-cucumber/150885 "2008-10-14T17:44:16Z")

</div>

I opened a ticket for that: http://rspec.lighthouseapp.com/projects/16211/tickets/44-ability-to-teardown-failing-or-pending-scenarios-in-different-ways Thomas -----Ursprüngliche Nachricht----- Von: “Michael L.” remo…

---

## [Any Plans on Tag support in Cucumber](https://www.ruby-forum.com/t/any-plans-on-tag-support-in-cucumber/150856)

<div class="topic-metadata">

**Author:** [@wei\_wei](https://www.ruby-forum.com/u/wei_wei)\
**Replies:** 1\
**Last updated:** [October 14, 2008, 9:22am UTC](https://www.ruby-forum.com/t/any-plans-on-tag-support-in-cucumber/150856 "2008-10-14T09:22:16Z")

</div>

Hi, ThoughtWorks just released the auto test toolset Twist, the “tagging” feature seems pretty useful, http://studios.thoughtworks.com/twist-agile-test-automation/twist-features-and-benefits “Tags allow you to organ…

---

## [Webrat within selector](https://www.ruby-forum.com/t/webrat-within-selector/150821)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 3\
**Last updated:** [October 14, 2008, 8:52am UTC](https://www.ruby-forum.com/t/webrat-within-selector/150821 "2008-10-14T08:52:21Z")

</div>

anyone know if/how webrat can scope a clicks\_link within a selector? eg, if I have more than one “Foo” link on a page, I want to make sure I click the one within a specific div Tia linoj

---

## [RSpec Book(s) on the radar](https://www.ruby-forum.com/t/rspec-book-s-on-the-radar/116436)

<div class="topic-metadata">

**Author:** [@Cody\_PSSkidmore](https://www.ruby-forum.com/u/Cody_PSSkidmore)\
**Replies:** 19\
**Last updated:** [October 14, 2008, 7:53am UTC](https://www.ruby-forum.com/t/rspec-book-s-on-the-radar/116436 "2008-10-14T07:53:30Z")

</div>

I just found this one: http://tinyurl.com/3c3mfa David, are there any other RSpec books in the works? With Regards, Cody S.

---

## [How to improve this spec](https://www.ruby-forum.com/t/how-to-improve-this-spec/150712)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 5:21am UTC](https://www.ruby-forum.com/t/how-to-improve-this-spec/150712 "2008-10-13T05:21:58Z")

</div>

Hi guys. One of my specs is very weak, and I’d really like to improve it. Lines 111-116 are what I’m having trouble speccing, and depend on lines 105-109. 105 # Grab all of the properties, filtering using the gi…

---

## [Rspec - undefined method \`describe' for main:Object](https://www.ruby-forum.com/t/rspec-undefined-method-describe-for-main-object/150593)

<div class="topic-metadata">

**Author:** [@manoah](https://www.ruby-forum.com/u/manoah)\
**Replies:** 16\
**Last updated:** [October 11, 2008, 5:16pm UTC](https://www.ruby-forum.com/t/rspec-undefined-method-describe-for-main-object/150593 "2008-10-11T17:16:52Z")

</div>

When i run a spec file i am getting the following error D:\\Diwakar\\spec\_diwa\\spec\\controllers\>spec sandbox\_controller\_spec.rb c:/ruby/lib/ruby/gems/1.8/gems/rspec-0.5.15/lib/spec/api/sugar.rb:17:in method\_ missing': u…

---

## [Private methode](https://www.ruby-forum.com/t/private-methode/150652)

<div class="topic-metadata">

**Author:** [@anita](https://www.ruby-forum.com/u/anita)\
**Replies:** 4\
**Last updated:** [October 11, 2008, 12:01am UTC](https://www.ruby-forum.com/t/private-methode/150652 "2008-10-11T00:01:05Z")

</div>

Hi, Can I test private methods directly? Or should I pass by the methods that are calling these private methods? Or can I make the method private after testing? What is the best way? Thank you

---

## [Solution for autospec not working](https://www.ruby-forum.com/t/solution-for-autospec-not-working/150580)

<div class="topic-metadata">

**Author:** [@sutch](https://www.ruby-forum.com/u/sutch)\
**Replies:** 5\
**Last updated:** [October 10, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/solution-for-autospec-not-working/150580 "2008-10-10T20:11:14Z")

</div>

Hello, I have noticed that, since version 1.1.4, autotest/autospec does not run any of my specs. After getting a hint from http://b.logi.cx/2008/10/9/non-auto-spec, I dove a bit deeper into the code and found that…

---

## [Re: Mocking Kernel.system or Kernel.\` for external application calls](https://www.ruby-forum.com/t/re-mocking-kernel-system-or-kernel-for-external-application-calls/150644)

<div class="topic-metadata">

**Author:** [@jgeiger](https://www.ruby-forum.com/u/jgeiger)\
**Replies:** 0\
**Last updated:** [October 10, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/re-mocking-kernel-system-or-kernel-for-external-application-calls/150644 "2008-10-10T19:55:24Z")

</div>

Thank you, it’s now working as expected. I was basing the code on what I had seen before, with examples of people stubbing Kernel.system, so I wasn’t thinking about just using the object itself.

---

## [Mocking Kernel.system or Kernel.\` for external application calls](https://www.ruby-forum.com/t/mocking-kernel-system-or-kernel-for-external-application-calls/150632)

<div class="topic-metadata">

**Author:** [@jgeiger](https://www.ruby-forum.com/u/jgeiger)\
**Replies:** 2\
**Last updated:** [October 10, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/mocking-kernel-system-or-kernel-for-external-application-calls/150632 "2008-10-10T18:20:58Z")

</div>

I’m running into an issue while trying to test the execution of some external applications called from inside my models. class OmssaPacker def self.run\_omssa\_aws2ez2\_unix(parameters) system(“perl /pipeline/vipdac/lib…

---

## [Need help using URL helpers in controller tests](https://www.ruby-forum.com/t/need-help-using-url-helpers-in-controller-tests/150559)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 3\
**Last updated:** [October 10, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/need-help-using-url-helpers-in-controller-tests/150559 "2008-10-10T17:41:01Z")

</div>

I have a controller test, where I want to do a GET on a page. Our URL’s are complex, and need to be correct (duh, but we allow some slop, but that causes a redirect which I want to avoid). Anyway, in my controller t…

---

## [Fills\_in NoMethodError](https://www.ruby-forum.com/t/fills-in-nomethoderror/150493)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 6\
**Last updated:** [October 10, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/fills-in-nomethoderror/150493 "2008-10-10T17:22:50Z")

</div>

I have an RSpec story with an overall structure that looks something like this - Given the user is on the start page When the user clicks the ‘new’ button Then the ‘new record’ page should be displayed When the use…

---

## [Rspec @ UC Berkley](https://www.ruby-forum.com/t/rspec-uc-berkley/150507)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 4\
**Last updated:** [October 10, 2008, 10:52am UTC](https://www.ruby-forum.com/t/rspec-uc-berkley/150507 "2008-10-10T10:52:41Z")

</div>

I find it sort of interesting that they are using RSpec in one of the courses @ UC Berkley: http://radlab.cs.berkeley.edu/wiki/Cs198 Scott

---

## [Cucumber / Webrat clicks\_button problem](https://www.ruby-forum.com/t/cucumber-webrat-clicks-button-problem/150550)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 1\
**Last updated:** [October 10, 2008, 10:52am UTC](https://www.ruby-forum.com/t/cucumber-webrat-clicks-button-problem/150550 "2008-10-10T10:52:40Z")

</div>

Before I dive into the code and fix it, has anyone else worked around / found the solution to calling ‘clicks\_button’ when the button is actually a button and not an input? ie: \<button type=“submit” …\> Text… / Imag…

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

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