>
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
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 wrote:
> Not sure on how to do that with Ste
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
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
>
git://github.com/dchelimsk
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 c
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 wrote:
> I'm wri
Mark Wilden wrote in post #816031:
> On Tue, Aug 19, 2008 at 2:35 PM, Jonathan Linowes
> wrote:
>
>>
>>rake spec RAILS_ENV=production
>>
>> that way the db:test:prepare uses the production db rather than the
>> development one
>
>
> I know this thread is long dead but ... you must be joking.
>
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,
Ste
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 m
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
http://old.nabble.com/forum/Search.jtp?query=rspec-users+rsp
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
>
>
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
con
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 inde
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
On 10 Nov, 22:50, Rhett Sutphin 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 = Book.new spec_pa
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
16 matches
Mail list logo