Sha256: d22044aea8277014661aed0a68e7fc1dc3e39a17ff1ec00464c0670b5fdb7a0b

Contents?: true

Size: 1.01 KB

Versions: 10

Compression:

Stored size: 1.01 KB

Contents

require File.dirname(__FILE__) + '/test_helper'
require 'mofo/rel_tag'

context "An array of reltag arrays created from the corkd review webpage" do
  setup do
    $tags ||= RelTag.find(:all => fixture(:corkd))
  end

  specify "should consist of 23 tags" do
    $tags.size.should.equal 23
  end

  specify "should include the berry and slippery tags" do
    $tags.flatten.should.include 'berry'
    $tags.flatten.should.include 'slippery'
  end
end

context "A web page with three rel tags" do
  setup do
    $page ||= <<-EOF
    <html>
    <body>
    <ul>
      <li><a href="/tags/miracle" rel="tag">miracle</a></li>
      <li><a href="/tags/wonder" rel="tag">wonder</a></li>
      <li><a href="/tags/amusement" rel="tag">amusement</a></li>
    </ul>
    </body>
    </html>
    EOF
  end

  specify "should produce an array of three RelTag objects" do
    tags = RelTag.find(:all, :text => $page)
    tags.should.be.an.instance_of Array
    tags.size.should.equal 3
    tags.should.equal ["miracle", "wonder", "amusement"]
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
calagator-1.0.0 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.9 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.8 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.7 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.6 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.5 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.3 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.2 vendor/gems/mofo-0.2.8/test/reltag_test.rb
grokus-1.0.0.1 vendor/gems/mofo-0.2.8/test/reltag_test.rb
calagator-1.0.0.rc3 vendor/gems/mofo-0.2.8/test/reltag_test.rb