You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
One of spec test is failing when deleting data that has "include Likeable":
Product on destroy should destroy reverse association
Failure/Error: relationship.destroy
NoMethodError:
undefined method `hkeys' for "localhost:6969":String
it 'should destroy reverse association' do
@product.reverse_stock_strains.create(:club_id => Factory(:club).id)
lambda {@product.destroy}.should change(Stock,:count).from(1).to(0)
end
Stock is the model that is including likeable. Since Stock is dependent on Product, it destroy Stock when Product is destroyed. That's when it throws the error.
localhost:6969 is where my redis test server:
RSpec.configure do |config|
REDIS_PID = "#{Rails.root}/tmp/pids/redis-test.pid"
REDIS_CACHE_PATH = "#{Rails.root}/tmp/cache/"
One of spec test is failing when deleting data that has "include Likeable":
Failure/Error: relationship.destroy
NoMethodError:
undefined method `hkeys' for "localhost:6969":String
Stock is the model that is including likeable. Since Stock is dependent on Product, it destroy Stock when Product is destroyed. That's when it throws the error.
localhost:6969 is where my redis test server:
RSpec.configure do |config|
REDIS_PID = "#{Rails.root}/tmp/pids/redis-test.pid"
REDIS_CACHE_PATH = "#{Rails.root}/tmp/cache/"
config.before(:suite) do
redis_options = {
"daemonize" => 'yes',
"pidfile" => REDIS_PID,
"port" => 6969,
"timeout" => 300,
"save 900" => 1,
"save 300" => 1,
"save 60" => 10000,
"dbfilename" => "dump.rdb",
"dir" => REDIS_CACHE_PATH,
"loglevel" => "debug",
"logfile" => "stdout",
"databases" => 16
}.map { |k, v| "#{k} #{v}" }.join('\n')
echo '#{redis_options}' | redis-server -
end
config.after(:suite) do
%x{
cat #{REDIS_PID} | xargs kill -QUIT
rm -f #{REDIS_CACHE_PATH}dump.rdb
}
end
end
is anyone else getting this error?
The text was updated successfully, but these errors were encountered: