test/arity_test.rb in sundawg-sinatra-assetpack-fork-0.0.12.pre1 vs test/arity_test.rb in sundawg-sinatra-assetpack-fork-0.1.6
- old
+ new
@@ -15,11 +15,17 @@
end
end
test "arity in #assets" do
paths = App.assets.packages['a.css'].paths
- assert_equal paths,
- [ "/css/screen.css", "/css/sqwishable.css", "/css/style.css", "/css/stylus.css", "/css/js2c.css" ]
+ expect = [ "/css/screen.css", "/css/sqwishable.css", "/css/style.css", "/css/stylus.css", "/css/js2c.css" ]
+ if RUBY_VERSION < "1.9"
+ # In 1.8.7 glob returns inconsitent files order so just check array are equivalents
+ assert_equal expect.size, paths.size
+ assert_equal 0, paths.reject{ |p| expect.include?(p) }.size
+ else
+ assert_equal expect, paths
+ end
assert App.assets.js_compression == :closure
assert App.assets.css_compression == :yui
end
end