Permalink
Browse files

Update specs

  • Loading branch information...
1 parent bd4f529 commit 5a6f147bc59fd9a1d5ac04ca4f3d7bbaab0119d5 nomadcoder committed Dec 25, 2012
@@ -1,5 +1,3 @@
require "netzke/core/ruby_ext/array"
require "netzke/core/ruby_ext/hash"
-require "netzke/core/ruby_ext/string"
-require "netzke/core/ruby_ext/symbol"
require "netzke/core/ruby_ext/time_with_zone"
View
@@ -213,9 +213,9 @@ Gem::Specification.new do |s|
"test/core_test_app/spec/actions_spec.rb",
"test/core_test_app/spec/base_spec.rb",
"test/core_test_app/spec/client_class_spec.rb",
- "test/core_test_app/spec/component",
"test/core_test_app/spec/composition_spec.rb",
"test/core_test_app/spec/core_ext_spec.rb",
+ "test/core_test_app/spec/dynamic_assets_spec.rb",
"test/core_test_app/spec/endpoint_response_spec.rb",
"test/core_test_app/spec/javascript_spec.rb",
"test/core_test_app/spec/js_class_config_scope.rb",
No changes.
@@ -3,12 +3,4 @@
it "should properly do netzke_deep_map" do
{a: [1,2,{b:3},{c:[4,5]}], d: 6}.netzke_deep_map{|el| el.is_a?(Hash) ? el.merge(e:7) : el + 10}.should == { a: [11,12,{e:7, b:3},{e:7, c:[14,15]}], d: 6}
end
-
- it "should strip js comments" do
- "var test;//commment".strip_js_comments.should == "var test;"
- end
-
- it "should not strip // in strings" do
- 'var someVar = "abc//def";'.strip_js_comments.should == 'var someVar="abc//def";'
- end
end
@@ -0,0 +1,10 @@
+require 'spec_helper'
+describe Netzke::Core::DynamicAssets do
+ it "should strip js comments" do
+ Netzke::Core::DynamicAssets.strip_js_comments("var test;//commment").should == "var test;"
+ end
+
+ it "should not strip // in strings" do
+ Netzke::Core::DynamicAssets.strip_js_comments('var someVar = "abc//def";').should == 'var someVar="abc//def";'
+ end
+end

0 comments on commit 5a6f147

Please sign in to comment.