similar to: Can not determine issue in my factories with factory girl in rspec

Displaying 20 results from an estimated 300 matches similar to: "Can not determine issue in my factories with factory girl in rspec"

2010 Aug 16
3
Load dummy data using Factory girl
Hello, I wanted to know how to load dummy data in the application using Factory girl. I had done this using Fixtures.I had made a fixtures folder into the test folder and run the command "rake test fixtures:load" Currently i tried using factories in the spec which is working fine. Wanted to know know regarding loading dummy data. -- Posted via http://www.ruby-forum.com/.
2013 Aug 29
4
linkedin gem
Hi, I am following this post * http://www.sitepoint.com/ruby-social-gems-linkedin/* for using linked gem and API for getting profile and other stuff But at the end I am getting this error: => Booting WEBrick => Rails 3.2.13 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Exiting
2012 Nov 12
1
Factory girl associations and rspec
Hi, I am trying to test factory girl associations basically I have a user model and status model , what is supposed to happen is a user has many statuses and a status belongs to a user. I have tried to model this in factory girl as you can see in the files. When I try to execute the test I get Failure/Error: visit("/users/#{user.id}/statuses/#{status.id}")
2010 Sep 01
1
Faking Paperclip has_attached_file with Factory girl?
Hello! I wonder if it''s possible to simulate Paperclip''s has_attached_file with Factory Girl and then test it with Rspec. I don''t get it to work. My factories.rb file looks like this: Factory.define :user do |user| user.name "Anders" user.email "user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org" user.password
2011 Aug 09
0
Devise, RSpec and Webrat
My app is builded with rails 2.3.12, rspec-rails 1.3.2, webrat 0.7.3. My spec_helper.rb ENV["RAILS_ENV"] ||= ''test'' require File.expand_path(File.join(File.dirname(__FILE__),''..'',''config'',''environment'')) require ''spec/autorun'' require ''spec/rails'' require
2010 Feb 04
2
preload test data from factory_girl
Is there a way to preload common data made by factory_girl to speed up tests instead of recreating these common data at the beginning of every test. For example, I want to have 10 users premade at the beginning of every test. I found this http://agilewebdevelopment.com/plugins/factory_data_preloader But the page says that this plugin does not "play nice" with autotest. But I use
2010 Feb 12
1
Why does config.gem mess up migration?
I was working this morning, trying to clean up my project and I did something that sent migrations to hell-in-a-hand-basket. I tried to run rake db:migrate --trace I got the following error msg: (in /Users/richardmartin/NetBeansProjects/ReTrace) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! Mysql::Error: Table
2010 Sep 27
3
having some issues with factory_girl and bundler...
Hi All Need some brilliants minds here :) I''m using Rails 2.3.8 & ruby 1.8 (I know, I know... ) I''ve move my gems from .gems to Bundler, but I''m having some issues with Factory_girl when I rake spec "uninitialized constant Factory" I''m following the instructions from http://gembundler.com/rails23.html. Basically: - grab all config.gem and place
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2012 Dec 04
0
Empty test suite is run after every rake task
When I run rake db:migrate or rake -T I get these lines at the end: Finished in 0.000276 seconds. 0 tests, 0 assertions, 0 failures, 0 errors My Gemfile is: source ''http://rubygems.org'' gem ''rack'' gem ''rails'', ''3.0.9'' gem "acl9", ''0.12.0'' gem "fastercsv"#, :version =>
2013 Sep 18
1
Cloud provisionner on CentOS 6 issue
Hi ! I am currently testing puppet on CentOS 6 and I wish to test the cloud provisioner tool. The problem is the following : I can''t use fog because of ruby version issue. The system : CentOS 6.4 with Ruby 1.8.7 (last version for CentOS) What I did to get the problem : install puppet-server install module puppetlabs-cloud_provisioner Trying install Fog -v 0.7.2 (cloud service library
2009 Jun 02
3
valdate_presnce_of email, :if => :validate_id + Factory girl
Hi In the model I have User attr_accessor :validate_email_id validates_presence_of :email ,:if => :validate_email_id Could anybody please tell me how can I define a Factory for the above? Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/.
2010 Sep 25
3
Factory_girl association with specific values
Hope this should be simple: I have a User model and a Role model. Factories for each. When I create a User using FG, I want to assign a specific role. Cant seem to figure out how to do this, getting errors like: uninitialized constant SysadminRole for doing things this way: Factory.define :user do |u| u.practice_id { |a| a.association(:practice).id } u.password ''password1''
2012 Apr 25
2
Test oddities
Can someone explain why a instance variable cannot be changed through an association under rspec/factory_girl? An example is in this gist<https://gist.github.com/2484336> . All tests pass except the last. All the steps pass in the console. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web
2013 Mar 11
0
Samba Bug 8881 still present in Samba 4.0.x?
Hello list, could someone in the know please tell me if Samba Bug #8881 (username map not working in security=ADS) is still present in Samba 4.0.x? Best regards, Heinz Mueller -- Gesendet von meinem /sent from my FSC Scenic P320 ;-) Heinz Mueller PBG MBG SDTS EP HE BS FUJITSU Fujitsu Technology Solutions GmbH Tel:(+49)5251 525 1583 Fax:(+49)5251 525 321583 Email:heinz.mueller at
2011 Jan 17
4
Factory Girl and attr_accessor with validation
I have a problem with a recent change to one of my models when created via Factory.create. class User < ActiveRecord::Base attr_accessor :tc_check validates :tc_check, :presence => true, :acceptance => true ... end The following definition fails, when calling Factory.create(:valid_user) Factory.define :valid_user, :class => User do |u| u.email
2010 Aug 08
2
issue with rescue_action_in_public! and testing 404 responses
Hello, I''m new to rails and I''m trying to wrap my heads around how to spec controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). The problem I''ve run into is when I want to test that my controllers respond with a 404 for unfound records. Whenever I run the spec, the ActiveRecord::RecordNotFound exception is not caught by rails, causing the spec
2013 Aug 22
1
How do I deal with ActiveRecord::RecordInvalid: Validation failed:
Hello all, I am currently writing model tests in rails 4. I am attempting to add an error to a reservation object if the total number of reservations for a given date and time has reached a pre-determined limit. When my test runs, it is hitting the appropriate code but it is raising the following error as opposed to just giving me an error in the object that I can use.
2011 Jun 09
1
Rcpp and Object Factories
Hello, I'm not exactly sure how to ask this question, but let me give it a shot... Is it possible (easy) to use Rcpp Modules in conjunction with object factories? For example what I am trying to do is something like this: // c++ classes class Foo { public: void do_something() {}; }; class Foo_Factory { public: Foo * create_foo() { return new Foo(); } }; ## R Code
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2. Running rspec on it brings about a large amount of these messages: DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:haml] instead. (called from block (2 levels) in <top (required)> at