cleanup and add translation hooks
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user