sass 3.4.19 → 3.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -354,6 +354,17 @@ WARNING
354
354
  assert_equal decimal_array, decimal_array_from_vlq
355
355
  end
356
356
 
357
+ def test_round_respects_precision
358
+ original_precision = Sass::Script::Value::Number.precision
359
+ assert_equal 0, Sass::Util.round(0.49999)
360
+ assert_equal 1, Sass::Util.round(0.499999)
361
+ Sass::Script::Value::Number.precision = 6
362
+ assert_equal 0, Sass::Util.round(0.499999)
363
+ assert_equal 1, Sass::Util.round(0.49999999)
364
+ ensure
365
+ Sass::Script::Value::Number.precision = original_precision
366
+ end
367
+
357
368
  def test_atomic_writes
358
369
  # when using normal writes, this test fails about 90% of the time.
359
370
  filename = File.join(Dir.tmpdir, "test_atomic")
data/test/test_helper.rb CHANGED
@@ -52,22 +52,23 @@ class MiniTest::Test
52
52
 
53
53
  def assert_warning(message)
54
54
  the_real_stderr, $stderr = $stderr, StringIO.new
55
- yield
55
+ result = yield
56
56
 
57
57
  if message.is_a?(Regexp)
58
58
  assert_match message, $stderr.string.strip
59
59
  else
60
60
  assert_equal message.strip, $stderr.string.strip
61
61
  end
62
+ result
62
63
  ensure
63
64
  $stderr = the_real_stderr
64
65
  end
65
66
 
66
67
  def assert_no_warning
67
68
  the_real_stderr, $stderr = $stderr, StringIO.new
68
- yield
69
-
69
+ result = yield
70
70
  assert_equal '', $stderr.string
71
+ result
71
72
  ensure
72
73
  $stderr = the_real_stderr
73
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.19
4
+ version: 3.4.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-10 00:00:00.000000000 Z
13
+ date: 2015-12-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yard