Displaying 20 results from an estimated 10000 matches similar to: "Instantiating Controller Object on Rails3 for unit testing"
2011 Jun 16
2
Authlogic: Trying to login in my Cucumber test - Authlogic::Session::Activation::NotActivatedError
In a Cucumber step definition, I''m trying to login, but I keep getting
this error:
You must activate the Authlogic::Session::Base.controller with a
controller object before creating objects
(Authlogic::Session::Activation::NotActivatedError)
My code:
Given /^I am the logged in (.+) "(.+)"$/ do |role, login|
user = User.create!(
:login => login,
:password =>
2010 Aug 30
1
in a rails3 - rspec then require 'authlogic/test_case' and now I broke stuff?
I''m a newb here and probably shouldn''t be using Rails3 yet to start with,
but for some reason I was feeling adventurous.
I''m also learning to use rspec along the way and things ''were'' working out
with my ''rake spec'' until I tried to follow some examples for test
Authlogic with rspec.
I ''think'' what started the
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
Im new to Rails, and decided to start of with Rails3. After a lot of
searching ive managed to get a little bit of Authlogic working. I''m able
to register a user, login & logout.
Now, I would like to add more features, get more of authlogic working.
I''m using Railscast EP 160 as my reference.
Portions of the code found on the tutorial throw errors: Eg:
<!--
2009 Oct 01
2
Any way to avoid instantiating a class twice?
Hey everyone, I''m trying to find a work around for a performance problem
I''ve been having.
I have a class that builds paths (among other things) dynamically to
many files and folders depending on what sets of information the user
accesses. Once built, this class instantiation contains all the
information necessary for several pages (controllers/views) to operate.
However at
2007 Apr 17
1
[LLVMdev] Instantiating the new Instructions from CallInst Class
Hello All,
I'm developing timing analysis tool using LLVM.
After several analysis phases, I want to instantiate several
instructions in the basic block.
Instructions that I try to instantiate are like below;
call void (int)* %waitABC(int 10)
%tmp = call int (int, int*)* %doABC(int %i, int* %total)
I think I should use 'CallInst' class in 'Instructions.h' file.
How I could
2011 Jun 21
1
[LLVMdev] Instantiating a JIT on win64
hi all,
I'm trying to write an LLVM-based interpreter for a small DSL that we have.
The language is very simple (essentially a calculator), but I'd like it to
execute efficiently. I've been following the tutorial, and have the
following code for instantiating an ExecutionEngine:
#include <LLVM\ExecutionEngine\JIT.h>
#include
2011 Aug 11
0
JRuby + Rails3 + Unit Tests = "Log" issue?
Hey all,
I am working on a Rails 3.0.7 application that is using JRuby 1.6.3,
running on Debian. I keep encountering an error regarding a missing
"Log" file when I am trying to run some Unit tests (among various
other activities). The cryptic error in question:
LoadError: No such file to load -- Log
Has anyone seen anything like this before? I am baffled as to where to
even begin to
2010 Aug 12
2
rails 3- Could not find generator session.
Hello,
I am trying to use Authlogic in Rails 3.
when I run " rails g session admin_session" to create the session, I
get-
======================
"Could not find generator session."
======================
I''m using Rail 3 RC and working off the Rail3 Branch now
======================
GemFile:
gem ''authlogic'', :git =>
2015 Jan 29
0
[LLVMdev] [Mips][TargetOptions] How to properly instantiate TargetOptions in MC layer?
Hi Eric,
as I was working on the same issues that are covered in your patch I also made a change in clang driver to pass this option to the assembler. Could you please review it and tell me your opinion?
http://reviews.llvm.org/D6091
Thanks
Vladimir
________________________________
From: Daniel Sanders
Sent: Wednesday, January 28, 2015 8:59 PM
To: Eric Christopher; Vladimir Medic; llvmdev at
2006 Feb 03
0
Instantiating multiple child objects
Hi,
I''ve been tinkering a bit with Ruby lately, and is truly amazed by its
automation, however some of it is a bit arcane for a newbie to
understand :|
Let''s say for instance I have a object Person which has_many
VehicleRegistrations, and I want to have a form that would enable me to
instantiate many VehicleRegistrations at once.
So supposing my form enables 2
2013 Jul 16
1
[LLVMdev] Instantiating Target-Specifc ASM Parser
Hello,
I am working on backend development and would like to utilize my target's MCAsmParser inside of an MCInst-level class implementation. I noticed that the AsmParser is registered with the target registry however I am having no luck grepping for a "template" of how to instantiate it and have yet to find specific documentation on how it is done. Any ideas or help is greatly
2010 Oct 30
3
Authlogic not active
Trying to add authlogic in a simple project but get the error;
Showing app/views/layouts/application.html.erb where line #33 raised:
undefined method `underscore'' for nil:NilClass
Extracted source (around line #33):
30: <div id="mainleft">
31: <ul class="menu">
32: <li><%= nav_link "Home", "site", "index"
2010 Oct 27
4
Anything special needed to migrate test::unit tests from Rails 2x to Rails3?
Looks like I''ve gotten my app upgraded successfully, at least in the
browser. When I ''rake test'' I get no love. I know I can start digging
through the Rails rake tasks, first want to see if anyone has an idea what
is going on:
DKMac:creditcompare3 DK$ rake test
(in /Users/DK/Documents/ror/projects/creditcompare3)
DKMac:creditcompare3 DK$
(requesting verbose fares just
2014 Apr 14
0
Foundation & Authlogic
Seems I can get either Foundation or Authlogic to work but not both -
After bundle install when I do a rails g foundation:install I get the
following:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-4.1.0/lib/acti
ve_record/dynamic_matchers.rb:26:in `method_missing': undefined local
variable o
r method `inheritable_attributes' for ActiveRecord::Base:Class
(NameError)
2007 Jan 15
6
Instantiating middleman and worker from inside a model?
In short: how (if possible) would i go about arranging it so that i
can instantiate a middleman and set a worker going from within a
method in one of my models? or is this a weird thing to be wanting to
do? (
My specific situation: I have an ''Image'' model in my application. An
actual image file associated with the model is being stored on
amazons s3 system.
2015 Jan 28
3
[LLVMdev] [Mips][TargetOptions] How to properly instantiate TargetOptions in MC layer?
Hi Eric,
The main thing we need to fix is that the selection between ELF32/ELF64 needs to depend on the ABI being N64 and not on whether we used a mips-linux-gnu triple versus a mips64-linux-gnu triple. So 'clang -target mips-linux-gnu' -mips64r2 -mabi=64' should produce an ELF64 and 'clang -target mips64-linux-gnu -mips32r2 -mabi=32' should produce an ELF32. In terms of code,
2015 Jan 27
2
[LLVMdev] [Mips][TargetOptions] How to properly instantiate TargetOptions in MC layer?
Hi all,
we have several features in Mips that are dependent on target abi. A recent commit(r224492) introduced a new -target-abi option to TargetOptions struct that provides access to abi string. This info is stored in MCSubtarget class(ARMSubratget in this case) and distributed to other libraries. Unfortunately, for Mips we need this info in other classes that don't have access to MCSubtarget
2006 Jan 25
0
Changing the instantiated table when using STI
Is there any way to get AR to instantiate a different class when using
STI? Where it would normally instantiate Digit, I would like it to
instantiate SkelDigit. Here''s why...
My rails app has the following STI hierarchy:
Digit < Glyph < ActiveRecord::Base
My migrate script can''t use those classes directly however (backward
compatibility issues), so I created some
2010 Dec 02
7
Rails 3 + Authlogic not working all of a sudden
Hey People,
I''ve been working on Rails 3.0.0 and Authlogic for quite a while now but
all of a sudden I can''t login into my application anymore.
After some research I found out that no sessions are stored into the db
anymore so I started the console and saw this:
ruby-1.9.2-p0 > u = UserSession.new({:username => ''Test'', :password =>
2010 Nov 15
0
Problem testing Authlogic UserSession
I''ve posted this to the Authlogic group but things seem a little quiet, so
perhaps someone here can help:
''m testing Authlogic 2.1.6, running under Rails 3.0.1., using rspec
2.1.0
I have the following:
user.rb
class User < ActiveRecord::Base
acts_as_authentic do |config|
config.login_field :email
config.ignore_blank_passwords false