# RSpec

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

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

---

## [\[Stories\] Login and subdomain](https://www.ruby-forum.com/t/stories-login-and-subdomain/131158)

<div class="topic-metadata">

**Author:** [@bastien-vaucher](https://www.ruby-forum.com/u/bastien-vaucher)\
**Replies:** 14\
**Last updated:** [March 7, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/stories-login-and-subdomain/131158 "2008-03-07T21:39:53Z")

</div>

I’ve just begin using rspec stories, and i m encountering some problems. In my application i have different subdomains in which specific users can log in, for example an admin will go to admin.myapp.com/authenticate/l…

---

## [Having trouble specing an ajax request](https://www.ruby-forum.com/t/having-trouble-specing-an-ajax-request/131030)

<div class="topic-metadata">

**Author:** [@namrata](https://www.ruby-forum.com/u/namrata)\
**Replies:** 3\
**Last updated:** [March 7, 2008, 2:27am UTC](https://www.ruby-forum.com/t/having-trouble-specing-an-ajax-request/131030 "2008-03-07T02:27:59Z")

</div>

Do I need to spec an AR. If yes, what is the best way to spec this. here is the code - def index @deals = Deal.paginate(:all, :conditions =\> prepare\_search\_conditions, :order =\> ‘created\_at DESC’, :page =\> params…

---

## [Rake spec aborting](https://www.ruby-forum.com/t/rake-spec-aborting/131207)

<div class="topic-metadata">

**Author:** [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Replies:** 0\
**Last updated:** [March 6, 2008, 10:41pm UTC](https://www.ruby-forum.com/t/rake-spec-aborting/131207 "2008-03-06T22:41:47Z")

</div>

hello, when running rake spec, I’m getting a stack trace similar to the one mentioned in this ticket, which has been resolved: http://rspec.lighthouseapp.com/projects/5645/tickets/237 but from what I understood, if t…

---

## [Stuck on testing validation](https://www.ruby-forum.com/t/stuck-on-testing-validation/130863)

<div class="topic-metadata">

**Author:** [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Replies:** 2\
**Last updated:** [March 6, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/stuck-on-testing-validation/130863 "2008-03-06T21:57:31Z")

</div>

Hello, I must be doing something dumb, but here it goes… why does this work? before(:each) do @work = Work.new end #for testing validates\_presence\_of :title it “should require a title” do @work.title = nil @work…

---

## [Including my plugin specs into rake spec](https://www.ruby-forum.com/t/including-my-plugin-specs-into-rake-spec/131201)

<div class="topic-metadata">

**Author:** [@visage](https://www.ruby-forum.com/u/visage)\
**Replies:** 0\
**Last updated:** [March 6, 2008, 9:45pm UTC](https://www.ruby-forum.com/t/including-my-plugin-specs-into-rake-spec/131201 "2008-03-06T21:45:46Z")

</div>

Hi, We’ve been building plugins for our app, and we kept running into forgetting to run the plugin specs when we updated from svn. So, I took the task on to have the rake spec command include our plugin specs, as we…

---

## [ActiveRecord, spec'ing find has right :order parameter](https://www.ruby-forum.com/t/activerecord-specing-find-has-right-order-parameter/131063)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 14\
**Last updated:** [March 6, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/activerecord-specing-find-has-right-order-parameter/131063 "2008-03-06T14:54:35Z")

</div>

I’m wanting to write a spec that a model is applying an :order option to a find call, but I don’t want to completely specify all of the find parameters. So I want to write something like this, say in a controller spec …

---

## [Mocking successive return values](https://www.ruby-forum.com/t/mocking-successive-return-values/131065)

<div class="topic-metadata">

**Author:** [@Doug\_Bryant](https://www.ruby-forum.com/u/Doug_Bryant)\
**Replies:** 6\
**Last updated:** [March 5, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/mocking-successive-return-values/131065 "2008-03-05T22:13:38Z")

</div>

I’m having a problems mocking successive return values. I don’t know if I’m doing something wrong or if this is a limitation of rspec mocks. Any ideas of what I may be doing wrong? I’m trying to test the generate\_…

---

## [Mocking successive return values](https://www.ruby-forum.com/t/mocking-successive-return-values/131082)

<div class="topic-metadata">

**Author:** [@Doug\_Bryant](https://www.ruby-forum.com/u/Doug_Bryant)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/mocking-successive-return-values/131082 "2008-03-05T21:35:49Z")

</div>

I’m having a problems mocking successive return values. I don’t know if I’m doing something wrong or if this is a limitation of rspec mocks. Any ideas of what I may be doing wrong? I’m trying to test the generate\_qu…

---

## [Testing that a model helper method is called](https://www.ruby-forum.com/t/testing-that-a-model-helper-method-is-called/131067)

<div class="topic-metadata">

**Author:** [@visage](https://www.ruby-forum.com/u/visage)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/testing-that-a-model-helper-method-is-called/131067 "2008-03-05T19:28:14Z")

</div>

So, I have a plugin that adds a method to ActiveRecord::Base, let’s call the method is\_encrypted. class MyModel \< ActiveRecord::Base is\_encrypted end So, my question is, how do I write a spec to show that is\_encryp…

---

## [Has\_many\_polymorphs is breaking my spec file](https://www.ruby-forum.com/t/has-many-polymorphs-is-breaking-my-spec-file/131031)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/has-many-polymorphs-is-breaking-my-spec-file/131031 "2008-03-05T15:14:19Z")

</div>

Hey folks I have a bunch of classes that are polymorphs, with has\_many\_polymorphs (they are all ‘labellable’, which is similar to being ‘taggable’ in the acts\_as\_taggable scheme). I have a couple of modules, Labella…

---

## [Rspec vs. test::more](https://www.ruby-forum.com/t/rspec-vs-test-more/130943)

<div class="topic-metadata">

**Author:** [@Matthias\_Hennemeyer](https://www.ruby-forum.com/u/Matthias_Hennemeyer)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 12:27am UTC](https://www.ruby-forum.com/t/rspec-vs-test-more/130943 "2008-03-05T00:27:05Z")

</div>

Hey all, you HAVE to read this blog post: http://blog.jrock.us/articles/RSpec%20vs.%20Test::More.pod#comments My favorite parts are: … some rspec code … For the sake of comparison lets translate this directly i…

---

## [Textmate bundle](https://www.ruby-forum.com/t/textmate-bundle/130973)

<div class="topic-metadata">

**Author:** [@visage](https://www.ruby-forum.com/u/visage)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/textmate-bundle/130973 "2008-03-04T21:23:11Z")

</div>

Hi, I’m just getting e set up on my machine, and I was wondering if someone could point me to the current rspec bundle for textmate? I googled and found a million of them, I think. Thanks. -Corey

---

## [Pretty story output for non-Rails project](https://www.ruby-forum.com/t/pretty-story-output-for-non-rails-project/130881)

<div class="topic-metadata">

**Author:** [@katrash](https://www.ruby-forum.com/u/katrash)\
**Replies:** 10\
**Last updated:** [March 4, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/pretty-story-output-for-non-rails-project/130881 "2008-03-04T18:57:15Z")

</div>

I’m taking my first fledgling steps driving a new ruby (non-rails) project with BDD. I’ve got a (test) story working. However, when I run the story in TextMate (via command-r), the output is plain text. See: Skitch …

---

## [Matchers tutorial](https://www.ruby-forum.com/t/matchers-tutorial/130875)

<div class="topic-metadata">

**Author:** [@Anthony\_Broad-Crawf](https://www.ruby-forum.com/u/Anthony_Broad-Crawf)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 4:53am UTC](https://www.ruby-forum.com/t/matchers-tutorial/130875 "2008-03-04T04:53:56Z")

</div>

I am looking for a good a - z matchers tutorial . Anyone got a url for one? Thanks Anthony Broad-Crawford

---

## [Testing Plugins + Lib Code](https://www.ruby-forum.com/t/testing-plugins-lib-code/130862)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 1:47am UTC](https://www.ruby-forum.com/t/testing-plugins-lib-code/130862 "2008-03-04T01:47:24Z")

</div>

Hi, I’m quite new to Rspec and I’m embarking on a new project. One thing I’m really not sure about is how to test plugins and code in your ‘lib/’ folder. Where would these specs actually live in the dir structure? Sh…

---

## [Rspec and plugins](https://www.ruby-forum.com/t/rspec-and-plugins/130824)

<div class="topic-metadata">

**Author:** [@Anthony\_Broad-Crawf](https://www.ruby-forum.com/u/Anthony_Broad-Crawf)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/rspec-and-plugins/130824 "2008-03-03T18:57:27Z")

</div>

I have a question regarding best practices around module and plugin testing for rails applications. In our application we have created several plugins that extend ActiveRecord::Base with class methods, that when invo…

---

## [Outside-in = integration tests on views?](https://www.ruby-forum.com/t/outside-in-integration-tests-on-views/130630)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 5\
**Last updated:** [March 3, 2008, 3:58am UTC](https://www.ruby-forum.com/t/outside-in-integration-tests-on-views/130630 "2008-03-03T03:58:28Z")

</div>

Hi, In the spirit of “outside-in” are given-when-then scenarios supposed to be integration tests of views? Or should we be accessing the model interfaces directly (not through a view)? Thanks, David :slight\_smile…

---

## [Rspec with continuations: very strange](https://www.ruby-forum.com/t/rspec-with-continuations-very-strange/130675)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 5\
**Last updated:** [March 2, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/rspec-with-continuations-very-strange/130675 "2008-03-02T12:41:41Z")

</div>

I appear to have written code which travels backwards through time: This disturbs me immensely. If anyone can explain it, that would be cool. I think it’s an illusion brought about by how RSpec wraps the…

---

## [How do i get color with autotest on XP?](https://www.ruby-forum.com/t/how-do-i-get-color-with-autotest-on-xp/130628)

<div class="topic-metadata">

**Author:** [@spencer](https://www.ruby-forum.com/u/spencer)\
**Replies:** 3\
**Last updated:** [March 1, 2008, 7:16am UTC](https://www.ruby-forum.com/t/how-do-i-get-color-with-autotest-on-xp/130628 "2008-03-01T07:16:28Z")

</div>

when i run “rake spec” i get color, if have --colour in spec.opts. when i run autotest the output isn’t displayed(i can tell the tests have run thanks to snarl), unless i get rid of --colour. however, now the output i…

---

## [Quiet Backtrace in RSpec](https://www.ruby-forum.com/t/quiet-backtrace-in-rspec/126534)

<div class="topic-metadata">

**Author:** [@meekish](https://www.ruby-forum.com/u/meekish)\
**Replies:** 6\
**Last updated:** [February 29, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/quiet-backtrace-in-rspec/126534 "2008-02-29T22:59:41Z")

</div>

I’m using RSpec on Rails and would like to clean up the backtraces, so I went looking for an RSpec equivalent to ThoughtBot’s Quiet Backtrace gemhttp://thoughtbot.com/projects/quietbacktrace. I found Spec::runner::Qui…

---

## [Bad specs better than none?](https://www.ruby-forum.com/t/bad-specs-better-than-none/130175)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 16\
**Last updated:** [February 29, 2008, 5:41am UTC](https://www.ruby-forum.com/t/bad-specs-better-than-none/130175 "2008-02-29T05:41:32Z")

</div>

Hi - I’ve got a bunch of people using specs at a company. Everybody is writing specs, but people are not really practicing BDD. As in, the specs are there, but it doesn’t go, write spec, write code, repeat. I recently…

---

## [New generated RSpec Video, demonstrating a GTK app](https://www.ruby-forum.com/t/new-generated-rspec-video-demonstrating-a-gtk-app/130538)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 29, 2008, 5:19am UTC](https://www.ruby-forum.com/t/new-generated-rspec-video-demonstrating-a-gtk-app/130538 "2008-02-29T05:19:17Z")

</div>

Hi all, With some time spent last Tue on the nyc.rb hackfest, I have a second video today of my endeavours with RSpec and recordings. It shows a handful of When&Then steps, with the accompanying GTK2 GUI executing th…

---

## [Autotest file](https://www.ruby-forum.com/t/autotest-file/130512)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 2\
**Last updated:** [February 28, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/autotest-file/130512 "2008-02-28T22:46:08Z")

</div>

I’m using rSpec 1.1.3 and ZenTest 3.9.1 and every time I run a test I get “All Tests Passed” … perhaps I should just leave it that way? :stuck\_out\_tongue: Anyways, I’ve attempted to construct my own ~/.autotest file a…

---

## [Problem with Plain Text Story Runner](https://www.ruby-forum.com/t/problem-with-plain-text-story-runner/130347)

<div class="topic-metadata">

**Author:** [@ggreaves](https://www.ruby-forum.com/u/ggreaves)\
**Replies:** 2\
**Last updated:** [February 28, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/problem-with-plain-text-story-runner/130347 "2008-02-28T19:19:16Z")

</div>

Hi Guys I’m new to Ruby and BDD. I’m having a problem while running my story in plain text. This is the console OUTPUT. /var/lib/gems/1.8/gems/rspec-1.1.3/lib/spec/story/runner/story\_mediator.rb:51:in current\_scenar…

---

## [Passing options into Story Runner (like --format)](https://www.ruby-forum.com/t/passing-options-into-story-runner-like-format/130352)

<div class="topic-metadata">

**Author:** [@lodestone](https://www.ruby-forum.com/u/lodestone)\
**Replies:** 0\
**Last updated:** [February 27, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/passing-options-into-story-runner-like-format/130352 "2008-02-27T15:41:10Z")

</div>

Hey, I’ve been trying to hook in the HTML formatter for story output, with zero success - passing the --format option to me stories/all.rb script was doing nothing. So, I slapped in some puts statements and figured o…

---

## [The git experiment](https://www.ruby-forum.com/t/the-git-experiment/130303)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 1\
**Last updated:** [February 27, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/the-git-experiment/130303 "2008-02-27T15:41:10Z")

</div>

Hey all, A while back I mentioned that we were going to move to git or hg. We decided that we’d experiment with each for a month and see how it goes. We’re going to start with git. Obviously if all goes well we’ll ha…

---

## [Has\_many\_polymorphs is breaking my testing](https://www.ruby-forum.com/t/has-many-polymorphs-is-breaking-my-testing/130333)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [February 27, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/has-many-polymorphs-is-breaking-my-testing/130333 "2008-02-27T14:15:56Z")

</div>

I have a class Property that was testing fine until i added the following to it: has\_many\_polymorphs :labelled, :from =\> \[:instructional\_objects, :lessons, :courses\], :through =\> :labels, :dependent =\> :destroy (i…

---

## [OT local version control?](https://www.ruby-forum.com/t/ot-local-version-control/127296)

<div class="topic-metadata">

**Author:** [@visage](https://www.ruby-forum.com/u/visage)\
**Replies:** 20\
**Last updated:** [February 27, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/ot-local-version-control/127296 "2008-02-27T13:09:42Z")

</div>

Hi, all, This isn’t about rspec, but this list has people whose opinions I respect. So, I’m looking for a new version control system for my local development. I was going to install subversion, but I’ve heard rumors…

---

## [Rspec Textmate bundle errors](https://www.ruby-forum.com/t/rspec-textmate-bundle-errors/116912)

<div class="topic-metadata">

**Author:** [@welly](https://www.ruby-forum.com/u/welly)\
**Replies:** 9\
**Last updated:** [February 26, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/rspec-textmate-bundle-errors/116912 "2008-02-26T21:57:22Z")

</div>

Hello all, Having a problem with the Rspec textmate bundle and having quizzed the guys in #textmate to no success about the errors, I’ve been suggested to try you guys! When I run the “Run Behaviour Description” comm…

---

## [\[Q\] how to restructure tests for an abstract class?](https://www.ruby-forum.com/t/q-how-to-restructure-tests-for-an-abstract-class/129793)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 6\
**Last updated:** [February 26, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/q-how-to-restructure-tests-for-an-abstract-class/129793 "2008-02-26T20:29:22Z")

</div>

While practicing BDD on my first-ever BDD project, I have come to a point where it makes sense to change my original class to an abstract class and create one (or more) concrete subclasses that implement a specific me…

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

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