Re: [rspec-users] undefined method `run_all' for []:Array

2013-02-07 Thread Andy Lindeman
Yes. It should be fixed. If you upgrade and still get the error, let us know! On Thursday, February 7, 2013, Doug Livesey wrote: > David Chelimsky wrote in post #971870: > > On Sun, Jan 2, 2011 at 5:42 AM, Kristian Mandrup > > > > > > wrote: > >> I'm using the latest ruby 1.9.3-head and recentl

Re: [rspec-users] undefined method `run_all' for []:Array

2013-02-07 Thread Doug Livesey
David Chelimsky wrote in post #971870: > On Sun, Jan 2, 2011 at 5:42 AM, Kristian Mandrup > wrote: >> I'm using the latest ruby 1.9.3-head and recently whenever I run rspec >> (2.2+) I get the following error: >> >> I have seen others have run into this issue, but to resolve it just >> rolled back

[rspec-users] undefined method `dependent' - rspec and shoulda

2011-09-04 Thread slavix
hello, Getting this error when using shoulda and rspec for model tests. my gemfile ... gem "shoulda-matchers" .. spec file .. it { should have_many(:balances).dependent(:destroy) } error: User shoulda validations Failure/Error: it { should have_many(:balances).dependent(:destroy) }

Re: [rspec-users] undefined method 'get'

2011-03-13 Thread Mike Mazur
Hi, On Mar 13, 2011 10:11 PM, "David Chelimsky" wrote: > The `get` method is available in examples (the block passed to `it` or `specify`), but here it's being called in a group (the block passed to `describe` or context`). Yeah, don't know how I missed that! Mike __

Re: [rspec-users] undefined method 'get'

2011-03-13 Thread DBA
Indeed. David Chelimsky was kind enough to repair my noob mistake via twitter. What was happening was exactly what he described in his reply. More info at: https://gist.github.com/858446 Thanks, DBA ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] undefined method 'get'

2011-03-13 Thread David Chelimsky
On Mar 7, 2011, at 1:30 AM, DBA wrote: > Hello guys, > > I was just starting a rails 3.0.5 application with rspec-rails 2.5.0 > and ruby 1.9.2-p180 and when I went to describe my controller I ran > into this undefined method 'get' error. > > Here's the spec that is causing the problem (which li

Re: [rspec-users] undefined method 'get'

2011-03-13 Thread Mike Mazur
Hi, On Mon, Mar 7, 2011 at 15:30, DBA wrote: > I was just starting a rails 3.0.5 application with rspec-rails 2.5.0 > and ruby 1.9.2-p180 and when I went to describe my controller I ran > into this undefined method 'get' error. > > Here's the spec that is causing the problem (which lives in the f

[rspec-users] undefined method 'get'

2011-03-13 Thread DBA
Hello guys, I was just starting a rails 3.0.5 application with rspec-rails 2.5.0 and ruby 1.9.2-p180 and when I went to describe my controller I ran into this undefined method 'get' error. Here's the spec that is causing the problem (which lives in the folder spec/controllers) require 'spec_help

Re: [rspec-users] undefined method `flunk' for #

2011-03-08 Thread Jonathan Cran
On 03/08/2011 07:08 PM, Jonathan Cran wrote: > I'm running into an issue using ONLY rspec version 1.3.3 (no rails / > rspec-rails with this project) where i'm hitting the following error: > My mistake, that's rspec version 1.3.1. jcran -- Jonathan Cran jc...@0x0e.org 515.890.0070

[rspec-users] undefined method `flunk' for #

2011-03-08 Thread Jonathan Cran
I'm running into an issue using ONLY rspec version 1.3.3 (no rails / rspec-rails with this project) where i'm hitting the following error: My code looks like this: describe Win32Meterpreter before :all helper_method end def helper_method ## If a session came

[rspec-users] undefined method `stub!' for

2011-01-30 Thread khelll
Hey, Using RSpec 2.4.0 with Rails 3.0.3 I'm doing this: rake spec:models and things works well. Now, when doing rspec spec/models/spot_spec.rb that has Spot.stub! :test1 I get: undefined method `stub!' for Spot:Class Am I missing something here?

Re: [rspec-users] undefined method `mock' for #

2011-01-19 Thread Wilker
Yeah, that is right, because mocks live on a space that is different for each spec (the MockSpace), this is why you can't create it in before :all ;) --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Wed, Jan 19, 2011 at 5:54 PM, Dan F. wrote: > Please see:

[rspec-users] undefined method `mock' for #

2011-01-19 Thread Dan F.
Please see: https://github.com/rspec/rspec-rails/issues/closed#issue/279 You can't create mocks in before(:all), but it will work in before(:each) -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://

Re: [rspec-users] undefined method `run_all' for []:Array

2011-01-02 Thread David Chelimsky
On Sun, Jan 2, 2011 at 5:42 AM, Kristian Mandrup wrote: > I'm using the latest ruby 1.9.3-head and recently whenever I run rspec > (2.2+) I get the following error: > > I have seen others have run into this issue, but to resolve it just > rolled back to a previous version of rspec or it there a be

[rspec-users] undefined method `run_all' for []:Array

2011-01-02 Thread Kristian Mandrup
I'm using the latest ruby 1.9.3-head and recently whenever I run rspec (2.2+) I get the following error: I have seen others have run into this issue, but to resolve it just rolled back to a previous version of rspec or it there a better way? ruby-1.9.3-head/gems/rspec-core-2.3.1/lib/rspec/core/ho

Re: [rspec-users] undefined method `contain' for #

2010-11-10 Thread David Chelimsky
On Nov 10, 2010, at 5:44 AM, Chad Ostrowski wrote: > Here's my Gemfile: > > group :development, :test do > gem 'rspec-rails', '2.0.0' > gem 'cucumber-rails', '0.3.2' > gem 'capybara', '0.4.0.rc' > end > > and here's my spec: > > describe "welcome/index.html.haml" do > it "displays 'Pro

[rspec-users] undefined method `contain' for #

2010-11-10 Thread Chad Ostrowski
Here's my Gemfile: group :development, :test do > gem 'rspec-rails', '2.0.0' > gem 'cucumber-rails', '0.3.2' > gem 'capybara', '0.4.0.rc' > end and here's my spec: describe "welcome/index.html.haml" do > it "displays 'Problem Child' in the header" do > render > rendered.should c

[rspec-users] undefined method `mock' for #

2010-10-03 Thread Jan Limpens
Hekko, what does the following mean? 1) PortfolioItemsController should render index Failure/Error: @portfolio = mock_model(Portfolio) undefined method `mock' for # # /Users/jan/.rvm/gems/ruby-1.9.2...@rails3/gems/actionpack-3.0.0/lib/action_dispatch/testing/assertions/routing.rb:

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-21 Thread Lord Raiden
> I'd prefer to be able to use Capybara matchers for > everything in order to avoid the duplication of two very similar but > slightly different APIs. > > Cheers, > Wincent Wincent pointed out my exact feelings on the matter (Probably in a better way than I could have.) But I'm willing to fol

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-21 Thread Wincent Colaiuta
El 21/09/2010, a las 13:55, David Chelimsky escribió: > On Sep 21, 2010, at 4:57 AM, Lord Raiden wrote: > >> David Chelimsky wrote: > >> Reason I'm asking is I really want to write few view specs, (outside of >> cucumber), and I would like not to use Webrat, to keep things clean. > > Why would

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-21 Thread David Chelimsky
On Sep 21, 2010, at 4:57 AM, Lord Raiden wrote: > David Chelimsky wrote: >> Two issues: >> >> 1. Capybara matchers do not support arbitrary strings, so they do not >> work in view specs >> 2. Even if they did, the capybara matcher would be has_css, not >> has_selector > > Thanks for quick repl

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-21 Thread David Chelimsky
On Sep 21, 2010, at 6:55 AM, David Chelimsky wrote: > On Sep 21, 2010, at 4:57 AM, Lord Raiden wrote: > >> David Chelimsky wrote: >>> Two issues: >>> >>> 1. Capybara matchers do not support arbitrary strings, so they do not >>> work in view specs >>> 2. Even if they did, the capybara matcher w

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-21 Thread Lord Raiden
David Chelimsky wrote: > Two issues: > > 1. Capybara matchers do not support arbitrary strings, so they do not > work in view specs > 2. Even if they did, the capybara matcher would be has_css, not > has_selector Thanks for quick reply. Sorry about my delay (I was sick and down). I'm not an ex

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-20 Thread Toni Tuominen
You should use this gem: http://github.com/grimen/rspec_tag_matchers - Toni On Sun, Sep 19, 2010 at 9:16 PM, David Chelimsky wrote: > On Sep 19, 2010, at 12:44 PM, Lord Raiden wrote: > >> I'm running rails 3.0.0 on ruby 1.9.2p0. >> >> I've rspec beta 22 with Capybara 0.3.9. NO WEBRAT. >> >> I'm

Re: [rspec-users] undefined method `has_selector?' for "":String

2010-09-19 Thread David Chelimsky
On Sep 19, 2010, at 12:44 PM, Lord Raiden wrote: > I'm running rails 3.0.0 on ruby 1.9.2p0. > > I've rspec beta 22 with Capybara 0.3.9. NO WEBRAT. > > I'm unable to use 'rendered.should have_selector('a') in my view specs. > > 1) home/_menu.erb should add a link to home first > Failure/Err

[rspec-users] undefined method `has_selector?' for "":String

2010-09-19 Thread Lord Raiden
I'm running rails 3.0.0 on ruby 1.9.2p0. I've rspec beta 22 with Capybara 0.3.9. NO WEBRAT. I'm unable to use 'rendered.should have_selector('a') in my view specs. 1) home/_menu.erb should add a link to home first Failure/Error: rendered.should have_selector('a', 'Home') undefined me

Re: [rspec-users] undefined method `route_for' for #

2010-08-30 Thread David Chelimsky
On Aug 30, 2010, at 9:36 AM, sleepwalker wrote: > Hello, all, I have this error with my rspec - controller - test, and > yes, I do found the thread with the same error here, but it isn't > helped me, think it's not my case. > > i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope the

[rspec-users] undefined method `route_for' for #

2010-08-30 Thread sleepwalker
Hello, all, I have this error with my rspec - controller - test, and yes, I do found the thread with the same error here, but it isn't helped me, think it's not my case. i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope they should match each other). my test is here: spec/controlle

Re: [rspec-users] undefined method

2010-06-28 Thread bertly_the_coder
Thanks David, That helps a lot and makes a lot of sense. Neat article by the way, was following to get a hang on rspec. Cheers! On Jun 28, 3:00 pm, David Chelimsky wrote: > On Jun 28, 2010, at 1:14 PM, bertly_the_coder wrote: > > > > > Hey Guys, > > I am working on my first TDD/BDDD example and

Re: [rspec-users] undefined method

2010-06-28 Thread David Chelimsky
On Jun 28, 2010, at 1:14 PM, bertly_the_coder wrote: > Hey Guys, > I am working on my first TDD/BDDD example and running into a problem, > when I run 'ruby app.rb" The app seems to run fine, but when I run > it's rspec 'spec app_spec.rb" I get a no method defined. > > app.rb > require 'rubygems'

[rspec-users] undefined method

2010-06-28 Thread bertly_the_coder
Hey Guys, I am working on my first TDD/BDDD example and running into a problem, when I run 'ruby app.rb" The app seems to run fine, but when I run it's rspec 'spec app_spec.rb" I get a no method defined. app.rb require 'rubygems' require 'open-uri' require 'hpricot' class Timer #this is t

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Marcelo de Moraes Serpa
Thanks David and Trey ;) Marcelo. On Mon, Jun 14, 2010 at 4:05 PM, David Chelimsky wrote: > The primary concepts are example groups and examples. An example group is a > group of examples. More technically, an example group is a class, and > examples are instances of that class. > > * example_gr

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread David Chelimsky
The primary concepts are example groups and examples. An example group is a group of examples. More technically, an example group is a class, and examples are instances of that class. * example_group, context, and describe all mean the same thing. * example, specify, and it all mean the same th

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Marcelo de Moraes Serpa
Ah! I thought I could use it / describe / context interchangeably. Thanks, Marcelo. On Mon, Jun 14, 2010 at 3:04 PM, Trey Bean wrote: > It looks like you need to put those lines in an it block. > > it 'should...' do > token... > end > > Trey > > On Jun 14, 2010, at 1:05 PM, Marcelo de Moraes

Re: [rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Trey Bean
It looks like you need to put those lines in an it block. it 'should...' do token... end Trey On Jun 14, 2010, at 1:05 PM, Marcelo de Moraes Serpa wrote: > Hello list, > > I have this very simple model spec: > > require 'spec_helper' > > describe Token do > describe "Associations" do >

[rspec-users] Undefined method respont_to - rspec

2010-06-14 Thread Marcelo de Moraes Serpa
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 error: /spec/models/token_spec.rb:7: undefined method `respond_to' for Spec

[rspec-users] undefined method

2010-03-29 Thread kojilab
Hi My test has the following line Account.stub(:find_by_slug_and_owner_id).with("my-account", '1').and_return(mock_account) In my model, I have def self.find_by_slug_and_owner_id(slug, owner_id) [code] end But I am getting NoMethodError in 'AccountsController GET add person

Re: [rspec-users] Undefined method 'post'

2010-03-08 Thread Amit Kulkarni
Hello, I am having some problem with the controllers after i updated my specs. Following are the details: I am trying to call create action as post :create :user => {:name => "abc", :login => "abcd", :phone => 1} After this i am searching this for confirmation i.e. user = User.find_by_name("ab

Re: [rspec-users] Undefined method 'post'

2010-03-08 Thread Amit Kulkarni
Amit Kulkarni wrote: > David Chelimsky wrote: >> On Mon, Mar 8, 2010 at 1:13 AM, Amit Kulkarni >> wrote: >>> As per the list there are 3 versions of rspec released in Jan 2010 i.e. >>> 1.3.0,1.3.1 and 1.3.2 >>> Also there are various versions starting from 2. >>> So from all above version which o

Re: [rspec-users] Undefined method 'post'

2010-03-08 Thread Amit Kulkarni
David Chelimsky wrote: > On Mon, Mar 8, 2010 at 1:13 AM, Amit Kulkarni > wrote: >> As per the list there are 3 versions of rspec released in Jan 2010 i.e. >> 1.3.0,1.3.1 and 1.3.2 >> Also there are various versions starting from 2. >> So from all above version which one is a stable one so that i

Re: [rspec-users] Undefined method 'post'

2010-03-07 Thread David Chelimsky
On Mon, Mar 8, 2010 at 1:13 AM, Amit Kulkarni wrote: > As per the list there are 3 versions of rspec released in Jan 2010 i.e. > 1.3.0,1.3.1 and 1.3.2 > Also there are various versions starting from 2. > So from all above version which one is a stable one so that i can > install it. Why would you

Re: [rspec-users] Undefined method 'post'

2010-03-07 Thread Amit Kulkarni
As per the list there are 3 versions of rspec released in Jan 2010 i.e. 1.3.0,1.3.1 and 1.3.2 Also there are various versions starting from 2. So from all above version which one is a stable one so that i can install it. -- Posted via http://www.ruby-forum.com/. _

Re: [rspec-users] Undefined method 'post'

2010-03-05 Thread David Chelimsky
On Fri, Mar 5, 2010 at 7:03 AM, Amit Kulkarni wrote: > Amit Kulkarni wrote: >> Hello all, >> I am facing a strange problem. >> I have generated rspec for a particular project.Similarly created a spec >> controller.Under that controller i have written post :create action >> When i run my spec i get

Re: [rspec-users] Undefined method 'post'

2010-03-05 Thread Amit Kulkarni
Amit Kulkarni wrote: > Hello all, > I am facing a strange problem. > I have generated rspec for a particular project.Similarly created a spec > controller.Under that controller i have written post :create action > When i run my spec i get an error as > "undefined method `post' for > #" > > Strange

[rspec-users] Undefined method 'post'

2010-03-04 Thread Amit Kulkarni
Hello all, I am facing a strange problem. I have generated rspec for a particular project.Similarly created a spec controller.Under that controller i have written post :create action When i run my spec i get an error as "undefined method `post' for #" Strangely my models are working fine.My rails

Re: [rspec-users] undefined method `has' in integration test

2010-02-22 Thread drewB
Any thoughts on how to get the matchers included? On Feb 21, 4:23 pm, drewB wrote: > I require webrat in spec_helper (Spork.prefork). > > versions: > > rails 2.1.2 > rspec 1.3.0 > rspec-rails 1.3.2 > ruby 1.8.7 > > The file is located at 'spec/integration/landing_page/ > Ianding_page_spec.rb'. I

Re: [rspec-users] undefined method `has' in integration test

2010-02-21 Thread drewB
I require webrat in spec_helper (Spork.prefork). versions: rails 2.1.2 rspec 1.3.0 rspec-rails 1.3.2 ruby 1.8.7 The file is located at 'spec/integration/landing_page/ Ianding_page_spec.rb'. I am running 'spec spec/integration/ landing_page/landing_page_spec.rb' I am also using the rspec-integra

Re: [rspec-users] undefined method `has' in integration test

2010-02-21 Thread David Chelimsky
On Sun, Feb 21, 2010 at 5:25 PM, drewB wrote: > Whenever I use a matcher like response.should have_text in an > integration test I receive the following error: > > undefined method `has' for # 0x7fe07d184038> > > Any idea why that is and how to fix it? What versions of rails, rspec, and ruby are

Re: [rspec-users] undefined method `has' in integration test

2010-02-21 Thread Nicolás Sanguinetti
On Sun, Feb 21, 2010 at 9:25 PM, drewB wrote: > Whenever I use a matcher like response.should have_text in an > integration test I receive the following error: > > undefined method `has' for # 0x7fe07d184038> > > Any idea why that is and how to fix it? I think—not sure—those matchers are provided

[rspec-users] undefined method `has' in integration test

2010-02-21 Thread drewB
Whenever I use a matcher like response.should have_text in an integration test I receive the following error: undefined method `has' for # Any idea why that is and how to fix it? Thanks! ___ rspec-users mailing list rspec-users@rubyforge.org http://rub

Re: [rspec-users] undefined method `route_for

2009-12-24 Thread Amit Kulkarni
Yes,Thanks a lot Andrew. The last two lines were not commented in routes.rb because of that it was matching default.Now i commented out those line and it was catching if undefined routes are given. -- Posted via http://www.ruby-forum.com/. ___ rspec-use

Re: [rspec-users] undefined method `route_for

2009-12-14 Thread Andrew Premdas
2009/12/14 Amit Kulkarni > Thanks David. > Also i am little bit confused regarding routes. > > Consider a routing example > > it "should map { :controller => 'channels', :action => 'new' } to > /channels/new" do > route_for(:controller => "channels", :action => "new").should == > "/channels/new"

Re: [rspec-users] undefined method `route_for

2009-12-13 Thread Amit Kulkarni
Thanks David. Also i am little bit confused regarding routes. Consider a routing example it "should map { :controller => 'channels', :action => 'new' } to /channels/new" do route_for(:controller => "channels", :action => "new").should == "/channels/new" end Now i can see all the routing meth

Re: [rspec-users] undefined method `route_for

2009-12-07 Thread David Chelimsky
On Mon, Dec 7, 2009 at 5:32 AM, Amit Kulkarni wrote: > Hi David, > I have some query regarding running spec command. > When i tried to run normal testcase by command "spec > test_controller_spec.rb" > then that particular test case runs but the routing testcase fails. > > Now if i run through the

Re: [rspec-users] undefined method `route_for

2009-12-07 Thread Amit Kulkarni
Hi David, I have some query regarding running spec command. When i tried to run normal testcase by command "spec test_controller_spec.rb" then that particular test case runs but the routing testcase fails. Now if i run through the command "spec spec/controllers/test_controller_spec.rb" then all

Re: [rspec-users] undefined method `route_for

2009-11-26 Thread David Chelimsky
On Thu, Nov 26, 2009 at 1:21 AM, Amit Kulkarni wrote: > Amit Kulkarni wrote: > > Ok Fine.That sounds to be a good idea. > > Thanks > > Hi David, > Good news,My routing scenarios are working now. > I dont know how but it did.I was going to mail you the app but it is > working fine now. > > Excelle

Re: [rspec-users] undefined method `route_for

2009-11-25 Thread Amit Kulkarni
Amit Kulkarni wrote: > Ok Fine.That sounds to be a good idea. > Thanks Hi David, Good news,My routing scenarios are working now. I dont know how but it did.I was going to mail you the app but it is working fine now. -- Posted via http://www.ruby-forum.com/. __

Re: [rspec-users] undefined method `register' for Polyglot:Module

2009-11-18 Thread Joe Van Dyk
Oh, hm. Looks like there's a lot of projects with the name 'polyglot'. Hm. On Wed, Nov 18, 2009 at 11:12 AM, Joe Van Dyk wrote: > Getting this error.  I have the treetop, polyglot, and rspec libraries > in the load_path (not installed as a gem).  Any ideas?  What defines > the register method?

[rspec-users] undefined method `register' for Polyglot:Module

2009-11-18 Thread Joe Van Dyk
Getting this error. I have the treetop, polyglot, and rspec libraries in the load_path (not installed as a gem). Any ideas? What defines the register method? /home/jvandyk/dev/web/wpn_rails/../../rcommon/lib/test/treetop/lib/treetop.rb:16: undefined method `register' for Polyglot:Module (NoMeth

Re: [rspec-users] undefined method `route_for

2009-11-17 Thread Amit Kulkarni
Ok Fine.That sounds to be a good idea. Thanks -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] undefined method `route_for

2009-11-17 Thread David Chelimsky
On Tue, Nov 17, 2009 at 4:53 AM, Amit Kulkarni wrote: > Amit Kulkarni wrote: > > Oh that means if i am using rails version 2.1.2 or more then i need to > > have rspec version 1.1.12. > > In that case i need to remove the latest version and install rspec > > 1.1.12. > > I will do it and update you

Re: [rspec-users] undefined method `route_for

2009-11-17 Thread Amit Kulkarni
Amit Kulkarni wrote: > Oh that means if i am using rails version 2.1.2 or more then i need to > have rspec version 1.1.12. > In that case i need to remove the latest version and install rspec > 1.1.12. > I will do it and update you asap. > Thanks a lot David. Hi David, As per the doc i updated m

Re: [rspec-users] undefined method `route_for

2009-11-15 Thread Amit Kulkarni
Oh that means if i am using rails version 2.1.2 or more then i need to have rspec version 1.1.12. In that case i need to remove the latest version and install rspec 1.1.12. I will do it and update you asap. Thanks a lot David. -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] undefined method `route_for

2009-11-13 Thread David Chelimsky
On Fri, Nov 13, 2009 at 2:28 AM, Amit Kulkarni wrote: > MY spec helper contains following code: > # This file is copied to ~/spec when you run 'ruby script/generate > rspec' > # from the project root directory. > ENV["RAILS_ENV"] ||= 'test' > require > > File.expand_path(File.join(File.dirname(__

Re: [rspec-users] undefined method `route_for

2009-11-13 Thread Amit Kulkarni
MY spec helper contains following code: # This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] ||= 'test' require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment')) require 'spec' require 'webrat'

Re: [rspec-users] undefined method `route_for

2009-11-12 Thread David Chelimsky
On Thu, Nov 12, 2009 at 11:32 PM, Amit Kulkarni wrote: > David Chelimsky wrote: > > On Wed, Nov 11, 2009 at 11:19 PM, Amit Kulkarni > > wrote: > > > >> >> > >> It gets executed but i am not able to see any results as in 2 examples 2 > >> passed something like that as it comes normally. > >> > > >

Re: [rspec-users] undefined method `route_for

2009-11-12 Thread Amit Kulkarni
David Chelimsky wrote: > On Wed, Nov 11, 2009 at 11:19 PM, Amit Kulkarni > wrote: > >> >> >> It gets executed but i am not able to see any results as in 2 examples 2 >> passed something like that as it comes normally. >> > > Then how do you know it gets executed? I dont know,When i run the comm

Re: [rspec-users] undefined method `route_for

2009-11-12 Thread David Chelimsky
On Wed, Nov 11, 2009 at 11:19 PM, Amit Kulkarni wrote: > David Chelimsky wrote: > > On Nov 11, 2009, at 5:58 AM, Amit Kulkarni wrote: > > > >> > >>it "should map { :controller => 'home' } RESTfully" do > >> params_from( :get, '/home' ).should == { :controller => 'home', > >> :action => '

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread Amit Kulkarni
David Chelimsky wrote: > On Nov 11, 2009, at 5:58 AM, Amit Kulkarni wrote: > >> >>it "should map { :controller => 'home' } RESTfully" do >> params_from( :get, '/home' ).should == { :controller => 'home', >> :action => 'index' } >>end >> end >> end >> >> I am using "spec home_control

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread David Chelimsky
On Nov 11, 2009, at 5:58 AM, Amit Kulkarni wrote: Hi David still no success. require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe HomeController, "routes" do describe "route generation" do it "should map { :controller => 'home', :action => 'index' } to / home" do

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread Amit Kulkarni
Hi David still no success. require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe HomeController, "routes" do describe "route generation" do it "should map { :controller => 'home', :action => 'index' } to /home" do route_for(:controller => 'home', :action => 'index

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread David Chelimsky
On Wed, Nov 11, 2009 at 1:42 AM, Amit Kulkarni wrote: > Thanks David for the information but still i am getting the same error. > What i have done is: > I have home controller. > now i am writing route scenarios in home_controller_spec.rb which is > under spec/controllers directory > > I tried yo

Re: [rspec-users] undefined method `route_for

2009-11-11 Thread Amit Kulkarni
Thanks David for the information but still i am getting the same error. What i have done is: I have home controller. now i am writing route scenarios in home_controller_spec.rb which is under spec/controllers directory I tried your code which looks like as describe "route generation", :type => :

Re: [rspec-users] undefined method `route_for

2009-11-10 Thread David Chelimsky
On Tue, Nov 10, 2009 at 4:44 AM, Amit Kulkarni wrote: > Hi all, > I am writing scenarios for testing my routes but it is giving me error > as undefined method `route_for and also for params_from. > Did i miss something which i need to add in my controller > > My code is as follows: > > require Fi

[rspec-users] undefined method `route_for

2009-11-10 Thread Amit Kulkarni
Hi all, I am writing scenarios for testing my routes but it is giving me error as undefined method `route_for and also for params_from. Did i miss something which i need to add in my controller My code is as follows: require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe H

Re: [rspec-users] undefined method get

2009-11-02 Thread BrianTheCoder
Thanks. I ended up just instantiating the rails integration session and operating off of that. Not the prettiest, but it does what I want it to. Also apparently the ActionController::Response breaks some methods that work on Rack::Response, go rails! *sarcasm* On Oct 31, 8:43 am, David Chelimsky

Re: [rspec-users] undefined method get

2009-10-31 Thread David Chelimsky
On Oct 29, 2009, at 6:04 PM, BrianTheCoder wrote: So here's the deal. Was using rack-test in rspec, cause I like passing paths instead of an action name, but it doesn't have access to the session, flash, cookies, etc. So I tried to switch to normal rspec and here's what I get (gist is working for

[rspec-users] undefined method get

2009-10-31 Thread BrianTheCoder
So here's the deal. Was using rack-test in rspec, cause I like passing paths instead of an action name, but it doesn't have access to the session, flash, cookies, etc. So I tried to switch to normal rspec and here's what I get (gist is working for me, so just pasting here) # error 1) NoMethodErro

Re: [rspec-users] undefined method `use_transactional_fixtures=' on windows with spec_server

2009-10-20 Thread David Chelimsky
On Tue, Oct 20, 2009 at 1:44 PM, mikev wrote: > Any suggestions for what to check when running on windows with: > rspec (1.2.9) > rspec-rails (1.2.9) > rails 2.3.3 > ruby 1.8.6 > spec_server > FYI - spec_server is removed from rspec-rails as of 1.2.9 and is no longer being maintained by me. If a

[rspec-users] undefined method `use_transactional_fixtures=' on windows with spec_server

2009-10-20 Thread mikev
Any suggestions for what to check when running on windows with: rspec (1.2.9) rspec-rails (1.2.9) rails 2.3.3 ruby 1.8.6 spec_server Run autospec with --drb option and get the following exception. Run autospec or 'spec spec' works fine. /spec/spec_helper.rb:19: undefined method `use_transactiona

Re: [rspec-users] undefined method `and_return'

2009-09-28 Thread Oliver Barnes
Hi David, I followed Borja's suggestion (message before mine). he had the same problem on a spree project, and traced it down to its use of the stump gem's helpers, which require a different syntax http://github.com/jeremymcanally/stump 2009/9/29 David Chelimsky : > On Mon, Sep 28, 2009 at 12:02

Re: [rspec-users] undefined method `and_return'

2009-09-28 Thread David Chelimsky
On Mon, Sep 28, 2009 at 12:02 PM, Oliver Barnes wrote: > thanks! had given up on this already. changing to the new syntax > >  Image.stub!(:find, :return => @image) Not sure where you got this syntax from, but it doesn't do anything. Options are: Image.stub(:find).and_return(@image) Image.stub(:

Re: [rspec-users] undefined method `and_return'

2009-09-28 Thread Oliver Barnes
thanks! had given up on this already. changing to the new syntax Image.stub!(:find, :return => @image) did get me past the error. I still can't get this spec to pass though: http://pastie.org/633580 updated spec: http://pastie.org/633584 and the controller being spec'ed: http://pastie.org

Re: [rspec-users] undefined method `and_return'

2009-09-26 Thread Borja Martín
Hi, I got the same error while writing an extension for Spree and found this thread through Google. It seems it's caused by the jeremymcanally-stump[1] gem used by the application. You should use the syntax shown in the documentation http://github.com/jeremymcanally/stump Regards On Wed, Aug 26,

Re: [rspec-users] undefined method `and_return'

2009-08-28 Thread Rick DeNatale
On Fri, Aug 28, 2009 at 9:33 PM, Oliver Barnes wrote: > I've done a project-wide search for stub!, and so far I haven't found > a conflicting method... but i'm brain-dead right now, will look again > tomorrow with fresh eyes. thanks for the response Rick I'd be tempted to run the spec under rdebug

Re: [rspec-users] undefined method `and_return'

2009-08-28 Thread Oliver Barnes
I've done a project-wide search for stub!, and so far I haven't found a conflicting method... but i'm brain-dead right now, will look again tomorrow with fresh eyes. thanks for the response Rick 2009/8/28 Rick DeNatale : > I don't usually top-post but in this case I think it works better. > > Is t

Re: [rspec-users] undefined method `and_return'

2009-08-28 Thread Rick DeNatale
I don't usually top-post but in this case I think it works better. Is there ANY chance that Image or one of it's superclasses has defined a stub! method which would override the one in Spec::Mocks::Methods ? On Fri, Aug 28, 2009 at 6:02 PM, Oliver Barnes wrote: > sorry to bother again, but no luc

Re: [rspec-users] undefined method `and_return'

2009-08-28 Thread Oliver Barnes
sorry to bother again, but no luck even after reinstalling rspec + rspec-rails: Big-Mac:spree(product-image-updates-fix) $ spec spec/controllers/admin/images_controller_spec.rb --backtrace /Users/oliver/Sites/spree/app/controllers/products_controller.rb:41: warning: parenthesize argument(s) for fu

Re: [rspec-users] undefined method `and_return'

2009-08-27 Thread Oliver Barnes
i guess it must be something wrong with my setup then? i've been messing with my gem infrastructure. going to try reinstalling rspec 2009/8/27 David Chelimsky : > Sorry, but no. The spec you showed in the original email should work > exactly as you expect. Somehow, for reasons I don't understand,

Re: [rspec-users] undefined method `and_return'

2009-08-27 Thread David Chelimsky
Sorry, but no. The spec you showed in the original email should work exactly as you expect. Somehow, for reasons I don't understand, stub!() appears to be returning a Proc instead of a mock proxy object. On Thu, Aug 27, 2009 at 9:35 AM, Oliver Barnes wrote: > does that shed any light? > > 2009/8/2

Re: [rspec-users] undefined method `and_return'

2009-08-27 Thread Oliver Barnes
does that shed any light? 2009/8/26 Oliver Barnes : > sure thing: > > http://pastie.org/595363 > > 2009/8/26 David Chelimsky : >> On Tue, Aug 25, 2009 at 6:19 PM, Oliver >> Barnes wrote: >>> Hello, >>> >>> I'm struggling with this controller spec for a few hours now >>> >>> http://pastie.org/59477

Re: [rspec-users] undefined method `and_return'

2009-08-26 Thread Oliver Barnes
sure thing: http://pastie.org/595363 2009/8/26 David Chelimsky : > On Tue, Aug 25, 2009 at 6:19 PM, Oliver > Barnes wrote: >> Hello, >> >> I'm struggling with this controller spec for a few hours now >> >> http://pastie.org/594775 >> >> which is failing with an error I can't find any references a

Re: [rspec-users] undefined method `and_return'

2009-08-26 Thread David Chelimsky
On Tue, Aug 25, 2009 at 6:19 PM, Oliver Barnes wrote: > Hello, > > I'm struggling with this controller spec for a few hours now > > http://pastie.org/594775 > > which is failing with an error I can't find any references about, > neither on the list nor on the web in general: > > Admin::ImagesContro

[rspec-users] undefined method `and_return'

2009-08-25 Thread Oliver Barnes
Hello, I'm struggling with this controller spec for a few hours now http://pastie.org/594775 which is failing with an error I can't find any references about, neither on the list nor on the web in general: Admin::ImagesController handling PUT /images/1 with successful update should find the ima

Re: [rspec-users] undefined method 'mock'

2009-08-24 Thread Jesterman81
Yeah, I'm an idiot. I was missing the whole 'it "should do something" do' line. Thanks for getting back so quick though! On Aug 23, 11:30 pm, David Chelimsky wrote: > On Sun, Aug 23, 2009 at 8:57 PM, Jesterman81 wrote: > > Greetings, > > > I am trying to use the mock method in rspec and it retu

Re: [rspec-users] undefined method 'mock'

2009-08-23 Thread David Chelimsky
On Sun, Aug 23, 2009 at 8:57 PM, Jesterman81 wrote: > Greetings, > > I am trying to use the mock method in rspec and it returns a undefined > method 'mock' error.  I am using this with the rspec book in chapter > 6.3.  Do I have to configure rspec someone.  I have gem rspec 1.2.8 > installed and us

Re: [rspec-users] undefined method 'mock'

2009-08-23 Thread Ben Mabey
Jesterman81 wrote: Greetings, I am trying to use the mock method in rspec and it returns a undefined method 'mock' error. I am using this with the rspec book in chapter 6.3. Do I have to configure rspec someone. I have gem rspec 1.2.8 installed and using ruby 1.8. any help will be appreciate

[rspec-users] undefined method 'mock'

2009-08-23 Thread Jesterman81
Greetings, I am trying to use the mock method in rspec and it returns a undefined method 'mock' error. I am using this with the rspec book in chapter 6.3. Do I have to configure rspec someone. I have gem rspec 1.2.8 installed and using ruby 1.8. any help will be appreciated. thanks __

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-19 Thread David Chelimsky
On Wed, Aug 19, 2009 at 7:24 AM, David Chelimsky wrote: > 2009/8/19 Maciej Bliziński : >> On Tue, Aug 18, 2009 at 6:54 PM, David Chelimsky wrote: >>> I really don't have any ideas. I did run into an unrelated problem >>> (manifest was out of date) and just pushed the fix for that. I'm able >>> to b

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-19 Thread David Chelimsky
2009/8/19 Maciej Bliziński : > On Tue, Aug 18, 2009 at 6:54 PM, David Chelimsky wrote: >> I really don't have any ideas. I did run into an unrelated problem >> (manifest was out of date) and just pushed the fix for that. I'm able >> to build the gem using Ruby 1.8.7 with no warnings or errors. >> >

  1   2   >