I have a simple test case that looks like this:
describe 'Quiz packs page' do
before :each do
FactoryGirl.create(:quiz_pack, :first_in_first_pack).should be_valid
end
end
it "should have an index page", :js => true do
visit quiz_packs_path
end
Why, when I visit the quiz_packs_path using selenium, do my traits from FactoryGirl not show up as an entry on the index page?
Honestly, I have read so much about FactoryGirl that my brain hurts, but I still don't quite understand how the creation occurs.
Here is my quiz pack if it helps. Please note I'm using a FactoryGirl trait because I have a bunch of these things. If this is an issue, please let me know.
FactoryGirl.define do
factory :quiz_pack do
trait :first_in_first_pack do |f|
f.pack 1
f.number 1
f.image "first_image
end
end
end