Created
September 26, 2009 22:14
-
-
Save jumph4x/194473 to your computer and use it in GitHub Desktop.
Can factory_girl do this? Is it my RSpec loading order?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# factories.rb | |
Factory.define :app do |i| | |
i.association :sku, :factory => :sku | |
i.base_vehicle_id BaseVehicle.last.id | |
end | |
# base_vehicle.rb | |
class BaseVehicle < ActiveRecord::Base | |
self.establish_connection :special_connection | |
end | |
#database.yml | |
special_connection: | |
adapter: postgresql | |
encoding: utf8 | |
database: special | |
username: xxxxxxxxxx | |
password: xxxxxxxxxx | |
host: 127.0.0.1 | |
# And when I am ready to go with my pretty BDD routine, i get this in my face | |
denis@ruckus:~/rails/spree$ spork rspec | |
Using RSpec | |
Loading Spork.prefork block... | |
uninitialized constant BaseVehicle (NameError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment