cleanup and add translation hooks

This commit is contained in:
2012-11-29 19:01:35 +01:00
parent b9c0ca326b
commit e0a3333e8f
8 changed files with 65 additions and 38 deletions
+35
View File
@@ -0,0 +1,35 @@
require 'spec_helper'
# Specs in this file have access to a helper object that includes
# the ApplicationHelper. For example:
#
# describe ApplicationHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe ApplicationHelper do
describe "onload_javascript" do
it "should add a normal string when given" do
onload_javascript "alert('hi')"
onload_javascript.should == "alert('hi')"
end
it "should concatenate separate statements correctly" do
onload_javascript "alert('hi')"
onload_javascript "alert('ho')"
onload_javascript.should == "alert('hi');alert('ho')"
end
it "should accept a block as argument" do
onload_javascript do
"alert('hi')"
end
onload_javascript.should == "alert('hi')"
end
it "should accept a lambda as argument" do
onload_javascript ->{ "alert('hi')" }
onload_javascript.should == "alert('hi')"
end
end
end
-15
View File
@@ -1,15 +0,0 @@
require 'spec_helper'
# Specs in this file have access to a helper object that includes
# the UsersHelper. For example:
#
# describe UsersHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe UsersHelper do
pending "add some examples to (or delete) #{__FILE__}"
end