Using factory_girl with sinatra and the sequel gem
Mike GriffinSequel does not appear to have a save!
method which means that using factory_girl is a bit more involved. Instead of being able to write Factory.create
and have the model saved, I found that I had to do it in two steps.
When I tried to use Factory.create(:post)
I was getting an error telling me
To get around the error, I used Factory.build
and then manually saved the post like this
That worked and now my cucumber tests are back to passing again