Re: [rspec-users] no such file to load -- sqlite3 error

2010-11-12 Thread David Chelimsky
On Nov 11, 2010, at 7:53 AM, Dean Richardson wrote: Paul: Thanks for taking the time to respond... that sounds like an attractively simple solution. When I go to try it, though, I'm told that the sqlite3 gem requires at least Ruby 1.9.1, and I'm still working with 1.8.7. Also, I'm

Re: [rspec-users] How to specify current directory for specs?

2010-11-12 Thread Daniel Lidström
On 10 Nov, 22:50, Rhett Sutphin rh...@detailedbalance.net wrote: Hi Daniel, [...] As an alternative, you might also consider having a helper like this: # again, in spec/spec_helper.rb def spec_path(path)   File.expand_path(../spec, __FILE__) end which you would use like so: book =

Re: [rspec-users] In spec/controller file not taking controller property

2010-11-12 Thread Arun Sharma
I am waiting for reply -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] In spec/controller file not taking controller property

2010-11-12 Thread Arun Sharma
I am working on Rspec for Controller testing.I am initial leve of rspec.I have a problem that in Spec/controller directory rspec file is not taking controller property as (instance varibale,flash notice) My controller code is as follow class PortalNewsController ApplicationController def

[rspec-users] pending tests fail when I switch to mock_with :mocha

2010-11-12 Thread Ole Morten Amundsen
First of all, please direct me into how better to search existing threads in this mailing list. Ok to my rspec 2.0.1 mocha 0.9.8 issue: given a controller test before do subject.expects(:authenticate).once end it should bla bla do pending PENDING, shouldn't fail? end with

Re: [rspec-users] In spec/controller file not taking controller property

2010-11-12 Thread David Chelimsky
On Nov 12, 2010, at 3:56 AM, Arun Sharma wrote: I am working on Rspec for Controller testing.I am initial leve of rspec.I have a problem that in Spec/controller directory rspec file is not taking controller property as (instance varibale,flash notice) My controller code is as follow class

Re: [rspec-users] pending tests fail when I switch to mock_with :mocha

2010-11-12 Thread David Chelimsky
On Nov 12, 2010, at 7:23 AM, Ole Morten Amundsen wrote: First of all, please direct me into how better to search existing threads in this mailing list. Not sure what you tried already, but: http://groups.google.com/group/rspec

Re: [rspec-users] Rspec 2, Rails 3 and Webrat

2010-11-12 Thread Ruben C.
I did this with webrat 0.7.2, rails 3.0.1, test-unit 2.1.1: require webrat require 'webrat/core/matchers' include Webrat::Methods Webrat.configure do |config| config.mode = :rack end and for now I can run tests like this: test testing_webrat_visit do visit 'home/index' end maybe some

[rspec-users] How do I include routing path helpers?

2010-11-12 Thread Steve
I'm writing some Steak acceptance tests in Rspec2 for my Rails3 app and I can't access various route helpers(members_path, new_member_path, etc...) in my specs, and can't figure out how to include them. I'm sure it's probably a simple config setting. Does anyone know what I need to do? Thanks,

Re: [rspec-users] How do I include routing path helpers?

2010-11-12 Thread Evgeniy Dolzhenko
Not sure on how to do that with Steak but you must be looking to include Rails.application.routes.url_helpers somewhere, with vanilla RSpec it would be describes 'included helpers' do include Rails.application.routes.url_helpers ... end On Fri, Nov 12, 2010 at 8:42 PM, Steve

Re: [rspec-users] How do I include routing path helpers?

2010-11-12 Thread Steve
I went with: config.include Rails.application.routes.url_helpers, :type = :acceptance but knowing what exactly to include was the important part. I still have a nil error when url_for tries to call host_with_port on the request object, but I think that has to do with my using subdomains with

Re: [rspec-users] In spec/controller file not taking controller property

2010-11-12 Thread Arun Sharma
thanks for reply --- i commented all lines of code which you mentioned but still this code is not working.Same code is working in other dummy application. I have installed rails 2.3.5 and rspec 2.1.0 and rspec-rails 2.1.0 and I also installed plugin

Re: [rspec-users] In spec/controller file not taking controller property

2010-11-12 Thread David Chelimsky
On Nov 12, 2010, at 11:11 PM, Arun Sharma wrote: thanks for reply --- i commented all lines of code which you mentioned but still this code is not working.Same code is working in other dummy application. I have installed rails 2.3.5 and rspec 2.1.0 and rspec-rails 2.1.0 and I

Re: [rspec-users] How do I include routing path helpers?

2010-11-12 Thread Steve
Thanks, that did it. I still have a nil error when trying to call host_with_port on the request object inside url_for, but I think that is related to my app having subdomains, and trying to use those with capybara. On Nov 12, 2:56 pm, Evgeniy Dolzhenko dolze...@gmail.com wrote: Not sure on how

[rspec-users] In spec/controller file not taking controller property

2010-11-12 Thread Arun Sharma
My rspec file is not taking controller property. In controller instance variable defined as : @portal_news=PortalNews.new In rspec file my code is get :create,:portal_news={:user_id=101} assigns[:portal_news].user_id.should=101 I getting error is NoMethodError in 'PortalNewsController