From 3a1589561783563a4ff2634e071bc4ef129419cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Mon, 31 Aug 2015 13:37:07 +0200 Subject: [PATCH] loads seeds for testing --- spec/models/debate_spec.rb | 2 +- spec/spec_helper.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/models/debate_spec.rb b/spec/models/debate_spec.rb index 22bd0bf91..ac0c62570 100644 --- a/spec/models/debate_spec.rb +++ b/spec/models/debate_spec.rb @@ -82,7 +82,7 @@ describe Debate do let(:debate) { create(:debate) } before(:all) do - create(:setting, key: "max_ratio_anon_votes_on_debates", value: "50") + Setting.find_by(key: "max_ratio_anon_votes_on_debates").update(value: 50) end it "should be true for level two verified users" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index bf1a65776..ef39ce84e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -21,6 +21,8 @@ RSpec.configure do |config| config.before(:each) do |example| DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction DatabaseCleaner.start + + load "#{Rails.root}/db/seeds.rb" end config.after(:each) do