mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-29 04:02:17 -04:00
Merge branch 'dev' of gitmaco:Growstuff/growstuff into photo_concern
This commit is contained in:
@@ -25,6 +25,7 @@ before_install:
|
||||
- phantomjs --version
|
||||
before_script:
|
||||
- bundle exec rake db:create db:migrate db:test:prepare
|
||||
- bundle exec rake assets:precompile
|
||||
script:
|
||||
- bundle exec rubocop --display-cop-names --rails
|
||||
- script/gemfile_check
|
||||
|
||||
@@ -4,7 +4,7 @@ module PlantingsHelper
|
||||
0
|
||||
elsif !planting.finished_at.nil?
|
||||
((p = planting.finished_at - DateTime.now).to_i) <= 0 ? 0 : p.to_i
|
||||
elsif planting.days_before_maturity.nil?
|
||||
elsif planting.planted_at.nil? || planting.days_before_maturity.nil?
|
||||
"unknown"
|
||||
else
|
||||
((p = (planting.planted_at + planting.days_before_maturity) - DateTime.now).to_i <= 0) ? 0 : p.to_i
|
||||
|
||||
@@ -6,6 +6,10 @@ Growstuff::Application.configure do
|
||||
# preloads Rails for running tests, you may have to set it to true.
|
||||
config.eager_load = false
|
||||
|
||||
# Do not compile assets on-demand. On-demand compilation slows down the test
|
||||
# suite and causes random test failures.
|
||||
config.assets.compile = false
|
||||
|
||||
# The test environment is used exclusively to run your application's
|
||||
# test suite. You never need to work with it otherwise. Remember that
|
||||
# your test database is "scratch space" for the test suite and is wiped
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'rake'
|
||||
begin
|
||||
require 'rspec/core/rake_task'
|
||||
task(:spec).clear
|
||||
RSpec::Core::RakeTask.new(spec: 'db:test:prepare') do |t|
|
||||
RSpec::Core::RakeTask.new(spec: ['db:create', 'db:test:prepare']) do |t|
|
||||
t.verbose = false
|
||||
end
|
||||
rescue LoadError
|
||||
|
||||
Reference in New Issue
Block a user