Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPistos <github.pistos@purepistos.net>2011-11-01 07:38:47 +0400
committerPistos <github.pistos@purepistos.net>2011-11-01 07:38:47 +0400
commite123b72d3546dae908309371fb8e2c3f421b8378 (patch)
treee780acba52a79a2694e44722813baa19347ed0ee /spec
parent3118f7a019877daf3da60ebf13fb4016e6cd3abd (diff)
Some empty lines to help bring the code structure out.
Diffstat (limited to 'spec')
-rw-r--r--spec/shared_behaviors/taggable.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/shared_behaviors/taggable.rb b/spec/shared_behaviors/taggable.rb
index 2eb2d95c3..0b750b38e 100644
--- a/spec/shared_behaviors/taggable.rb
+++ b/spec/shared_behaviors/taggable.rb
@@ -19,14 +19,17 @@ describe Diaspora::Taggable do
@object.build_tags
@object.save!
end
+
it 'links the tag to /p' do
link = link_to('#vöglein', '/tags/vöglein', :class => 'tag')
Diaspora::Taggable.format_tags(@str).should include(link)
end
+
it 'responds to plain_text' do
Diaspora::Taggable.format_tags(@str, :plain_text => true).should == @str
end
end
+
describe '#build_tags' do
it 'builds the tags' do
@object.send(@object.class.field_with_tags_setter, '#what')
@@ -37,6 +40,7 @@ describe Diaspora::Taggable do
}.should change{@object.tags.count}.by(1)
end
end
+
describe '#tag_strings' do
it 'returns a string for every #thing' do
str = '#what #hey #that"smybike. #@hey ##boo # #THATWASMYBIKE #vöglein #hey#there #135440we #abc/23 ### #h!gh #ok? #see: #re:publica'
@@ -45,6 +49,7 @@ describe Diaspora::Taggable do
@object.send(@object.class.field_with_tags_setter, str)
@object.tag_strings.should =~ arr
end
+
it 'returns no duplicates' do
str = '#what #what #what #whaaaaaaaaaat'
arr = ['what','whaaaaaaaaaat']
@@ -52,6 +57,7 @@ describe Diaspora::Taggable do
@object.send(@object.class.field_with_tags_setter, str)
@object.tag_strings.should =~ arr
end
+
it 'is case insensitive' do
str = '#what #wHaT #WHAT'
arr = ['what']