# RSpec

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

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

---

## [Rspec-rails-2.0.0.beta.13 requires rails-3.0.0.beta4](https://www.ruby-forum.com/t/rspec-rails-2-0-0-beta-13-requires-rails-3-0-0-beta4/190688)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [June 25, 2010, 4:40am UTC](https://www.ruby-forum.com/t/rspec-rails-2-0-0-beta-13-requires-rails-3-0-0-beta4/190688 "2010-06-25T04:40:37Z")

</div>

PLEASE NOTE: rspec-rails-2.0.0.beta.13 requires rails-3.0.0.beta4. If you are upgrading to rspec-rails-2.0.0.beta.13, you must also upgrade to rails-3.0.0.beta4. Apologies for any confusion caused by my not making an …

---

## [\[RSpec\]Doubt while Testing with RSpec](https://www.ruby-forum.com/t/rspec-doubt-while-testing-with-rspec/190685)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 25, 2010, 4:24am UTC](https://www.ruby-forum.com/t/rspec-doubt-while-testing-with-rspec/190685 "2010-06-25T04:24:14Z")

</div>

Hi, I have a library of RSpec Test examples. Now, from an upper ruby layer, I need to run only individual separate test example from the library that matches a particular string in the upper layer. For Example: My R…

---

## [Rspec(-rails).2.0.0.beta.13: no such file to load -- action\_view/testing/resolvers](https://www.ruby-forum.com/t/rspec-rails-2-0-0-beta-13-no-such-file-to-load-action-view-testing-resolvers/190687)

<div class="topic-metadata">

**Author:** [@anywho](https://www.ruby-forum.com/u/anywho)\
**Replies:** 1\
**Last updated:** [June 25, 2010, 3:49am UTC](https://www.ruby-forum.com/t/rspec-rails-2-0-0-beta-13-no-such-file-to-load-action-view-testing-resolvers/190687 "2010-06-25T03:49:06Z")

</div>

Running into issues with latest rspec beta. Beta.12 works flawlessly. Any insights are appriciated. /mnt/bob/bob.building.app/vendor/bundle/gems/activesupport-3.0.0.beta3/ lib/active\_support/dependencies.rb:209:in req…

---

## [RSpec, plugins and stubbing controller methods](https://www.ruby-forum.com/t/rspec-plugins-and-stubbing-controller-methods/190686)

<div class="topic-metadata">

**Author:** [@antonyw](https://www.ruby-forum.com/u/antonyw)\
**Replies:** 1\
**Last updated:** [June 25, 2010, 3:48am UTC](https://www.ruby-forum.com/t/rspec-plugins-and-stubbing-controller-methods/190686 "2010-06-25T03:48:31Z")

</div>

Hello, I have some code that is going to be used in other applications, so I decided to bundle the code (mostly controllers and views) into a plugin to make sharing easier. I copied the RSpec tests for the controller…

---

## [Issue when run my specs in Textmate but not in terminal](https://www.ruby-forum.com/t/issue-when-run-my-specs-in-textmate-but-not-in-terminal/190527)

<div class="topic-metadata">

**Author:** [@liberte](https://www.ruby-forum.com/u/liberte)\
**Replies:** 1\
**Last updated:** [June 24, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/issue-when-run-my-specs-in-textmate-but-not-in-terminal/190527 "2010-06-24T18:25:18Z")

</div>

Hello, I’m experiencing a weird behavior that I cant find the solution. My specs that depends on Factory Girl with attachment only works in command line and not in Textmate with Command+R or Command +Shift+R. My app …

---

## [Cucumber - organize scenario outline example](https://www.ruby-forum.com/t/cucumber-organize-scenario-outline-example/190654)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 1\
**Last updated:** [June 24, 2010, 4:46pm UTC](https://www.ruby-forum.com/t/cucumber-organize-scenario-outline-example/190654 "2010-06-24T16:46:19Z")

</div>

Dear all For the scenario outline example: Example: | start | eat | left | | 12 | 5 | 7 | | 20 | 5 | 15 | If my examples got 30 columns and 1000 rows. It would be difficult to organize in the .featu…

---

## [RSpec 2: what should I replace 'params\_from' with?](https://www.ruby-forum.com/t/rspec-2-what-should-i-replace-params-from-with/190636)

<div class="topic-metadata">

**Author:** [@ivo](https://www.ruby-forum.com/u/ivo)\
**Replies:** 4\
**Last updated:** [June 24, 2010, 3:35pm UTC](https://www.ruby-forum.com/t/rspec-2-what-should-i-replace-params-from-with/190636 "2010-06-24T15:35:27Z")

</div>

Hey, I’m migrating an app to Rails 3 + RSpec 2 and, as expected, a number of specs broke. Unfortunately, I can’t really find how to fix them. For instance, there is a spec: describe SessionsController do describe “r…

---

## [Weirdness with rake spec!](https://www.ruby-forum.com/t/weirdness-with-rake-spec/190610)

<div class="topic-metadata">

**Author:** [@cghost](https://www.ruby-forum.com/u/cghost)\
**Replies:** 5\
**Last updated:** [June 23, 2010, 10:01pm UTC](https://www.ruby-forum.com/t/weirdness-with-rake-spec/190610 "2010-06-23T22:01:10Z")

</div>

Hi everyone. I am totally confused by this… If I run rake spec, I get a bunch of failures in a particular file, but if I run script/spec on that individual file, all examples pass. The error I am getting is with t…

---

## [Bundler, rake spec and Steak](https://www.ruby-forum.com/t/bundler-rake-spec-and-steak/190529)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 2\
**Last updated:** [June 22, 2010, 8:48pm UTC](https://www.ruby-forum.com/t/bundler-rake-spec-and-steak/190529 "2010-06-22T20:48:19Z")

</div>

Hello list, I have noted a few problems when using rake spec. First, it doesn’t seem to load the gems from the Gemfile (:test group) I had to add a required for each gem in this group on the spec\_helper.rb file when …

---

## [Cleaner failure messages?](https://www.ruby-forum.com/t/cleaner-failure-messages/190427)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 5\
**Last updated:** [June 22, 2010, 6:38pm UTC](https://www.ruby-forum.com/t/cleaner-failure-messages/190427 "2010-06-22T18:38:20Z")

</div>

Hi all. Sorry if this is an old request… Currently when a failure is reported it looks like this: C:\\dev\\ruby\\faster\_rubygems\\spec\>spec spec.faster\_rubygems\_cacheing.rb F RuntimeError in ‘FasterRubyGems cachein…

---

## [RSpec 2 view specs: partial mocks](https://www.ruby-forum.com/t/rspec-2-view-specs-partial-mocks/190457)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 10\
**Last updated:** [June 22, 2010, 6:34pm UTC](https://www.ruby-forum.com/t/rspec-2-view-specs-partial-mocks/190457 "2010-06-22T18:34:14Z")

</div>

Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12? I’m trying to do things like view.stub(:current\_user).and\_return(@user) view.stub(:current\_page?).and\_return(false) However, when I do that, the view u…

---

## [Rspec-rails 2 webrat dependency](https://www.ruby-forum.com/t/rspec-rails-2-webrat-dependency/190420)

<div class="topic-metadata">

**Author:** [@dracko](https://www.ruby-forum.com/u/dracko)\
**Replies:** 3\
**Last updated:** [June 22, 2010, 3:03am UTC](https://www.ruby-forum.com/t/rspec-rails-2-webrat-dependency/190420 "2010-06-22T03:03:26Z")

</div>

Hi, I’ve finally make all my tests pass in Rails 3 with Capybara. After removing webrat’s dependency in favor of the new Capybara one, I expected that bundle install would remove Webrat dependencie. After a few minute…

---

## [RSpec 2 view example: render\_template](https://www.ruby-forum.com/t/rspec-2-view-example-render-template/190442)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 10\
**Last updated:** [June 20, 2010, 5:19pm UTC](https://www.ruby-forum.com/t/rspec-2-view-example-render-template/190442 "2010-06-20T17:19:10Z")

</div>

On http://github.com/rspec/rspec-rails under “View specs” there’s an example describe “events/index.html.erb” do it “renders \_event partial for each event” do assign(:events, \[stub\_model(Event), stub\_model(Event)\]) …

---

## [Mocking/Faking requests for js/ajax-based tests](https://www.ruby-forum.com/t/mocking-faking-requests-for-js-ajax-based-tests/190374)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 7\
**Last updated:** [June 20, 2010, 12:46pm UTC](https://www.ruby-forum.com/t/mocking-faking-requests-for-js-ajax-based-tests/190374 "2010-06-20T12:46:24Z")

</div>

Hello all, I have an acceptance test that aims to bdd a Google Apps OpenID authentication feature. This login screen also uses some JS (in order to switch between the regular / Google OpenID forms). Now, I know this i…

---

## [RSpec 2: view example groups don't load helpers?](https://www.ruby-forum.com/t/rspec-2-view-example-groups-dont-load-helpers/190430)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 2\
**Last updated:** [June 20, 2010, 1:54am UTC](https://www.ruby-forum.com/t/rspec-2-view-example-groups-dont-load-helpers/190430 "2010-06-20T01:54:31Z")

</div>

I’m in the process of moving an app from Rails 2.3.8 to 3. In the view spec I’m currently migrating, I get the error undefined method \`link\_to\_xyz’ for #ActionView::Base:0x7f2c4c0e4820 That method is defined in one of…

---

## [Unexpected behavior with Matchers::Change and empty collections](https://www.ruby-forum.com/t/unexpected-behavior-with-matchers-change-and-empty-collections/190380)

<div class="topic-metadata">

**Author:** [@johnf](https://www.ruby-forum.com/u/johnf)\
**Replies:** 1\
**Last updated:** [June 19, 2010, 3:05am UTC](https://www.ruby-forum.com/t/unexpected-behavior-with-matchers-change-and-empty-collections/190380 "2010-06-19T03:05:29Z")

</div>

The behavior of Spec::Matchers::Change in rspec 1.3.0 appears to overlook a small corner case. When the initial value is {} or \[\] but the from clause is nil, rspec will report that the initial value is correct. Of cou…

---

## [Chain argument expectations?](https://www.ruby-forum.com/t/chain-argument-expectations/190328)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 2\
**Last updated:** [June 18, 2010, 6:33pm UTC](https://www.ruby-forum.com/t/chain-argument-expectations/190328 "2010-06-18T18:33:51Z")

</div>

I’m trying to test some code that can loop once or multiple times and assign some values to another object. I want to test one of the values being assigned to the object in the loop. e.g. class Foo def bar values =…

---

## [Cleanup wiki](https://www.ruby-forum.com/t/cleanup-wiki/190038)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 9:59pm UTC](https://www.ruby-forum.com/t/cleanup-wiki/190038 "2010-06-17T21:59:15Z")

</div>

The wiki (especially the index on its right hand) http://wiki.github.com/dchelimsky/rspec/ currently (to me) feels a bit hard to navigate. Given that my one request to github to allow for orderable right hand index w…

---

## [Undefined local variable or method \`assigns'](https://www.ruby-forum.com/t/undefined-local-variable-or-method-assigns/190003)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 8\
**Last updated:** [June 17, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-assigns/190003 "2010-06-17T17:24:02Z")

</div>

On Thu, Jun 10, 2010 at 4:41 PM, removed\_email\_address@domain.invalid wrote: end The error is: undefined local variable or method \`assigns’ for #Spec::Rails::Example::ModelExampleGroup::Subclass\_1:0x2fbac28 I feel l…

---

## [Undefined method respont\_to - rspec](https://www.ruby-forum.com/t/undefined-method-respont-to-rspec/190290)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 4\
**Last updated:** [June 17, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/undefined-method-respont-to-rspec/190290 "2010-06-17T16:35:21Z")

</div>

Hello list, I have this very simple model spec: require ‘spec\_helper’ describe Token do describe “Associations” do token = Token.new token.should respond\_to(:user) end end When I run it, I get the following erro…

---

## [Rspec (steak) turning off transactional fixtures](https://www.ruby-forum.com/t/rspec-steak-turning-off-transactional-fixtures/190204)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 7\
**Last updated:** [June 17, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/rspec-steak-turning-off-transactional-fixtures/190204 "2010-06-17T16:35:21Z")

</div>

Hey all, I have replaced Cucumber with Steak and I like the experience so far. It is not as polished as Cucumber in what comes to configuration, but it is simpler and covers my needs perfectly. I’ve followed the tric…

---

## [Testing render :update](https://www.ruby-forum.com/t/testing-render-update/190297)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 7\
**Last updated:** [June 17, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/testing-render-update/190297 "2010-06-17T16:35:18Z")

</div>

Hey guys. I would like to test the following behavior: render :update do |page| page.replace\_html 'errors', :partial =\> 'signup\_errors', :locals =\> { :errors =\> ‘errors’} end } I’m doing: controller.s…

---

## [Method stub return values for message expectations](https://www.ruby-forum.com/t/method-stub-return-values-for-message-expectations/190247)

<div class="topic-metadata">

**Author:** [@tomx](https://www.ruby-forum.com/u/tomx)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/method-stub-return-values-for-message-expectations/190247 "2010-06-17T16:26:23Z")

</div>

Hi, RSpec has long had the ability to set a message expectation for a stubbed method without disrupting its (stubbed) return value. This is really helpful for a variety of reasons, not least because it decouples the …

---

## [Accessing constants from another module within examples](https://www.ruby-forum.com/t/accessing-constants-from-another-module-within-examples/190165)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/accessing-constants-from-another-module-within-examples/190165 "2010-06-17T16:26:21Z")

</div>

Hello. I wanted to include module into ExampleGroup to write less code within examples, but was unable to do so. This seems to be strange, because in regular Class it works and all methods within that module are also …

---

## [RSpec 2: uninitialized constant - mocking belongs\_to AR relation](https://www.ruby-forum.com/t/rspec-2-uninitialized-constant-mocking-belongs-to-ar-relation/189977)

<div class="topic-metadata">

**Author:** [@kristianm](https://www.ruby-forum.com/u/kristianm)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/rspec-2-uninitialized-constant-mocking-belongs-to-ar-relation/189977 "2010-06-17T16:22:48Z")

</div>

gems/ruby-1.9.2-head/bundler/gems/rspec- core-2398fcadf5beb256bed9c548c59445d3b4c8a047-master/lib/rspec/core/ backward\_compatibility.rb:26:in const\_missing': uninitialized constant Message::User (NameError) from /Users…

---

## [I'm having a couple of nuisance things happening with jruby and rspec](https://www.ruby-forum.com/t/im-having-a-couple-of-nuisance-things-happening-with-jruby-and-rspec/190221)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/im-having-a-couple-of-nuisance-things-happening-with-jruby-and-rspec/190221 "2010-06-17T16:22:44Z")

</div>

Hi all, I have a couple of things that are happening when using jruby. I consistently getting a ‘Command failed’ raised when using rake. The Kernel.system() call on line ~ 176 of lib/spec/rake/spectask.rb is alwa…

---

## [Rails 3 Mailer spec with arguments?](https://www.ruby-forum.com/t/rails-3-mailer-spec-with-arguments/190036)

<div class="topic-metadata">

**Author:** [@churp](https://www.ruby-forum.com/u/churp)\
**Replies:** 4\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/rails-3-mailer-spec-with-arguments/190036 "2010-06-17T16:22:35Z")

</div>

This came out of the mailer generator w/ Rspec-rails installed : describe Notifier do it “should deliver activation instructions message” do @expected.subject = “Activation instructions” @expected.to = “removed\_…

---

## [Stubbing before\_filters with RSpec and stub!](https://www.ruby-forum.com/t/stubbing-before-filters-with-rspec-and-stub/189995)

<div class="topic-metadata">

**Author:** [@Joseph\_DelCioppio](https://www.ruby-forum.com/u/Joseph_DelCioppio)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/stubbing-before-filters-with-rspec-and-stub/189995 "2010-06-17T16:22:30Z")

</div>

Guys, I’ve got a private controller method which acts as a before\_filter that I’m trying to stub. class TasksController \< ApplicationController before\_filter :load\_user … private def load\_user if current\_user.id …

---

## [Re: I'm having a couple of nuisance things happening with jruby and rspec](https://www.ruby-forum.com/t/re-im-having-a-couple-of-nuisance-things-happening-with-jruby-and-rspec/190228)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/re-im-having-a-couple-of-nuisance-things-happening-with-jruby-and-rspec/190228 "2010-06-17T16:22:27Z")

</div>

Jay, Yes, I have done this and yes I don’t get any error messages. But the command ran from rake fails and rake aborts. It is like the rake task in rspec using Kernal.system is returning with a negative false here i…

---

## [Blog post on filtering examples in rspec-2](https://www.ruby-forum.com/t/blog-post-on-filtering-examples-in-rspec-2/190182)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/blog-post-on-filtering-examples-in-rspec-2/190182 "2010-06-17T16:22:13Z")

</div>

Hey all, Here’s a post on filtering examples in rspec-2: http://blog.davidchelimsky.net/2010/06/14/filtering-examples-in-rspec-2/ Cheers, David

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

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