Skip to content

Commit

Permalink
Aliases should not be treated like a folder or a bookmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Aßmann committed Apr 15, 2010
1 parent ad8e2f0 commit f79a345
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/nokogiri/decorators/xbel/alias.rb
Expand Up @@ -2,7 +2,7 @@ module Nokogiri::Decorators::XBEL
module Alias
extend Forwardable
def_delegators :entry,
:description, :title, :to_s, :id, :added, :bookmark?, :folder?
:description, :title, :to_s, :id, :added

# Returns reference to bookmark or folder id.
def ref
Expand Down
10 changes: 5 additions & 5 deletions test/test_xbel.rb
Expand Up @@ -56,12 +56,12 @@
end

context 'Alias' do
setup { topic.root.aliases.first }
should('be an alias') { topic.alias? }

setup { topic.root.aliases }
should('be an alias') { topic.all? { |a| a.alias? } }
should('not be a bookmark') { !topic.any? { |a| a.bookmark? } }
should('not be a folder') { !topic.any? { |a| a.folder? } }
should('have a reference') do
topic.ref and
topic.ref == topic.reference
topic.all? { |a| a.ref and a.ref == a.reference }
end
end

Expand Down

0 comments on commit f79a345

Please sign in to comment.