similar to: Experience with RSpec

Displaying 20 results from an estimated 10000 matches similar to: "Experience with RSpec"

2006 Feb 17
3
Switchtower (0.10.0), ssh and environment confusion
Seems like my day for Rails posts... :) OK. I''ve started using Swtichtower to help with deploying changes to my production rails apps. Unfortunately I''ve come accros an inconsistency that I can''t quite figure out. It''s about the PATH env var under Bash. I''ve created a task that just does a: run "env", to show what I''m seeing:
2012 Oct 18
3
Issues upgrading RSpec
My specs work fine with this in my Gemfile.lock: grep rspec Gemfile.lock rspec (2.11.0) rspec-core (~> 2.11.0) rspec-expectations (~> 2.11.0) rspec-mocks (~> 2.11.0) rspec-core (2.11.0) rspec-expectations (2.11.1) rspec-mocks (2.11.1) rspec-rails (2.11.0) rspec (~> 2.11.0) rspec-rails (~> 2.11) After "bundle update
2006 Sep 04
4
Fields
Sorry for asking so many questions recently. Just wondered. I originally had acts_as_ferret in my model and I performed a few searches. I then decided to change this line to acts_as_ferret :fields => [ ?name? ] However when I perform searches it is still listing results with queries contained in fields other than the ''name'' field. How do i fix this? -- Posted via
2007 Dec 13
1
RSpec and Mock Tutorial/Cheatsheet
I wrote a simple summary of Mocks with RSpec as an answer to a discussion on our local Ruby users group. I was wondering if people here could review it, adding comments for any corrections or other important ideas regarding mocks and RSpec. You can find the article here: http://blog.showcase60.com/2007/12/13/rspec-mocks Thanks
2006 Aug 23
8
acts_as_ferret with Mongrel and Edge Rails
Hi there, Has anyone tried acts_as_ferret with Edge Rails and Mongrel? When I install the plugin to a project that has Edge Rails frozen, and the Mongrel gem installed, I can''t start the server. There''s no error, it just doesn''t start. I''ve used acts_as_ferret in the past with WEBrick, and stable Rails releases without a hitch. If I remove the
2011 Jan 20
4
No command 'rspec' found
I installed rspec on Linux Ubuntu 10.04, but no command ''rspec'' is found. Perhaps the PATH is wrong. What is the correct search path? The following was copied from my terminal. Thank you for taking a look: ~$ sudo gem install rspec --version 2.0.0 ~$ gem list --local *** LOCAL GEMS *** rspec (2.0.0) ~$ ls /var/lib/gems/1.8/gems rspec-2.0.0 ~$ printenv PATH
2005 Oct 05
3
Shopping Cart: SKU and Product Confusion
Hi there, I''m at a loss... I was on the #ROR channel last night and spoke to a really helpful person (Defiler) who gave me some direction on building a shopping cart. Unfortunately, I wasn''t able to successfully get to where I need to go. This is the predicament I am currently finding myself in: I''m building a shopping cart for a client''s new website. They
2007 Mar 12
10
using mocha with rspec
Hi folks. I''ve just started using rspec and I have to say it''s very nice. The thing is, I prefer mocha''s mocking dialect. So I thought a simple require ''mocha'' would set me up. Unfortunately, rspec does all its goodness using do/end blocks in anonymous classes, so it wasn''t quite that obvious. Anyway, here is the incantation I ended up
2008 May 30
2
Any good Rails example app created with RSpec and Rspec on Rails?
Hi, I''m pretty new to RSpec. I''ve been browsing http://opensourcerails.com to find a good app built using RSpec (and RSpec on Rails). Does anybody have a recommendation? I wanna see example of mocks/stubs, associated models and integrated_view. -T
2006 Oct 25
5
Mocha, Stubba and RSpec
Hi, I''ve been reading with interest the threads trying to integrate Mocha and Stubba with RSpec. So far, I''ve made the two changes in spec_helper.rb suggested, but discovered another one that neither of the archives mentions: If you use traditional mocking: object = mock or the stub shortcut : object = stub(:method => :result), you run into namespace conflicts with
2010 Jul 13
2
[Rspec] Difference between stub and message expectation with any_number_of_times
I''m wondering what''s the difference between stub and message expectation with any_number_of_times, for example: myMock = mock("mymock") myMock.stub!(:is_a?).with(MyClass).and_return(false) and myMock = mock("mymock") myMock.should_receive(:is_a?).with(MyClass).any_number_of_times.and_return(false) because is_a? may not be called at all, it just like a
2008 Jun 03
9
Build rspec-rails as a gem?
I can''t figure out how to build rspec-rails as a gem when just cloned from github... there isn''t any .gemspec file or rake task that does this. Any help? -- Posted via http://www.ruby-forum.com/.
2007 Dec 04
4
AutoTest / Rspec - "stack level too deep"
Hello, I''m running AutoTest with Rspec on a Rails application. Every 20 or so runs I get "stack level too deep" on one particular controller stub. Ex. controller.stub!(:login).and_return(true) This particular line is in a before block of a certain describe block. The strange thing is, every single spec in this file fails on that one line, even the specs in other describe
2007 Jul 06
5
Outside-In with RSpec on Rails
I just read ''Mocks Aren''t Stubs'' and was intrigued by the notion of ''outside-in'' TDD. As a Rails developer, I''m curious if others are employing this method when developing Rails applications using RSpec. Is it common practice (or even practical) to drive the development of a Rails app by starting with view specs, then controller specs, then
2011 Jan 30
5
Named routes problem... more rails than rspec
Howdy, I have emailed before about the inconsistencies I''m spotting when using named routes/resource, but I think I''ve narrowed down the issue. It would seem this has nothing to do with rspec per se, but more with how routing works with rails. If you have an object instance, that isn''t saved and you attempt to generate a path for that item, even though the item may
2007 Aug 17
11
[rspec] looking for a simple refresher
I''ve been off the rspec for a few months and I''m trying to get back on it. 1) Spec::Mocks::MockExpectationError in ''TicketsController handling POST /tickets should create a new ticket'' Mock ''Ticket_1001'' expected :new with ({}) once, but received it 0 times ./spec/controllers/tickets_controller_spec.rb:16: script/spec:4: class
2006 Sep 11
4
Using rspec and mocha
I prefer to use rspec than test::unit for developing my apps. However I''ve found its mocking library to be pretty inflexible compared to Mocha. This isn''t really a surprise since rspec isn''t intended as a mocking framework, whereas Mocha is. So I''d like to play to both of their strengths and use rspec as my testing/specification framework and Mocha do to
2006 Sep 11
4
Using rspec and mocha
I prefer to use rspec than test::unit for developing my apps. However I''ve found its mocking library to be pretty inflexible compared to Mocha. This isn''t really a surprise since rspec isn''t intended as a mocking framework, whereas Mocha is. So I''d like to play to both of their strengths and use rspec as my testing/specification framework and Mocha do to
2008 Sep 13
3
RCov / RSpec segfaults on Ubuntu
Hi all, I appreciate that this is not an RSpec question, but I wondered if anyone out there can offer some pointers. We''re using the latest versions of RSpec and RCov, and ruby --version says this (on the Ubuntu build server): ruby 1.8.6 (2008-07-17 patchlevel 279) [x86_64-linux] We''re getting intermittent (yes, intermittent!) segfaults from the build when running
2007 Sep 18
2
rSpec / Nested Routes / Mocks
I''m having a terrible time trying to test a nested route with rSpec. I can''t seem to tell rSpec to expect the call @item.user. The following error message plagues me not matter how I try to fuss with the mock: Spec::Mocks::MockExpectationError in ''ItemsController handling POST / items should redirect to the new course on successful save'' Mock