Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to mysql for tests #494

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace :testbed do
Tempfile.open('surveyor_Rakefile') do |f|
f.write("application \"config.time_zone='Rome'\"\n")
f.flush
sh "bundle exec rails new testbed --skip-bundle -m #{f.path}" # don't run bundle install until the Gemfile modifications
sh "bundle exec rails new testbed -d mysql --skip-bundle -m #{f.path}" # don't run bundle install until the Gemfile modifications
end
chdir('testbed') do
gem_file_contents = File.read('Gemfile')
Expand All @@ -41,7 +41,7 @@ namespace :testbed do
chdir('testbed') do
Bundler.with_clean_env do
sh 'bundle exec rails generate surveyor:install'
sh 'bundle exec rake db:migrate db:test:prepare'
sh 'bundle exec rake db:migrate:reset db:test:prepare'
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
# https://github.com/rspec/rspec-core/issues/456
config.verbose_retry = true # show retry status in spec process
retry_count = ENV['RSPEC_RETRY_COUNT']
config.default_retry_count = retry_count.try(:to_i) || 1
config.default_retry_count = retry_count.try(:to_i) || 5
puts "RSpec retry count is #{config.default_retry_count}"

## Database Cleaner
Expand All @@ -96,4 +96,4 @@
end
JsonSpec.configure do
exclude_keys "id", "created_at", "updated_at", "uuid", "modified_at", "completed_at"
end
end
4 changes: 2 additions & 2 deletions spec/support/wait_for_ajax.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module WaitForAjax
def wait_for_ajax(wait_time = 1)
def wait_for_ajax(wait_time = 3)
Timeout.timeout(wait_time) do
loop until finished_all_ajax_requests?
end
Expand All @@ -8,4 +8,4 @@ def wait_for_ajax(wait_time = 1)
def finished_all_ajax_requests?
page.evaluate_script('jQuery.active').zero?
end
end
end
4 changes: 2 additions & 2 deletions surveyor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Gem::Specification.new do |s|

s.add_development_dependency('yard')
s.add_development_dependency('rake')
s.add_development_dependency('sqlite3')
s.add_development_dependency('bundler', '~> 1.6.1')
s.add_development_dependency('mysql2')
s.add_development_dependency('bundler', '~> 1.6')
s.add_development_dependency('rspec-rails', '~> 2.14.2')
s.add_development_dependency('capybara', '~> 2.2.1')
s.add_development_dependency('launchy', '~> 2.4.2')
Expand Down