瀏覽代碼

Update defaults

Chris Mullins 6 年之前
父節點
當前提交
2b35330787
共有 2 個文件被更改,包括 4 次插入5 次删除
  1. 1 1
      test/remote/helpers/transition_helpers.rb
  2. 3 4
      test/remote/spec/transition_spec.rb

+ 1 - 1
test/remote/helpers/transition_helpers.rb

@@ -2,7 +2,7 @@ require 'chroma'
 
 module TransitionHelpers
   module Defaults
-    PERIOD = 225
+    PERIOD = 500
     NUM_PERIODS = 20
     DURATION = PERIOD * NUM_PERIODS
   end

+ 3 - 4
test/remote/spec/transition_spec.rb

@@ -636,9 +636,8 @@ RSpec.describe 'Transitions' do
 
   context 'computed parameters' do
     (@transition_defaults = {
-      duration: {default: 4.5, test: 2},
-      num_periods: {default: 10, test: 5},
-      period: {default: 450, test: 225}
+      duration: {default: 10.0, test: 2},
+      period: {default: 500, test: 225}
     }).each do |k, params|
       it "it should compute other parameters given only #{k}" do
         seen_values = 0
@@ -675,7 +674,7 @@ RSpec.describe 'Transitions' do
         expected_duration = (k == :duration ? params[:test] : (TransitionHelpers::Defaults::DURATION/1000.0))
         num_periods = (expected_duration/period.to_f)*1000
 
-        expect(duration).to be_within(1.5).of(expected_duration)
+        expect(duration).to be_within(2).of(expected_duration)
         expect(gap).to be_within(10).of((255/num_periods).ceil)
       end
     end