File: post_spec.rb

package info (click to toggle)
ruby-roxml 3.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 824 kB
  • ctags: 557
  • sloc: ruby: 4,066; xml: 1,013; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'spec_helper'
require_relative './../../examples/posts'

describe Post do
  before do
    @posts = Posts.from_xml(xml_for('posts')).posts
  end

  it "should extract description" do
    @posts.each {|post| post.description.should_not be_empty }
  end

  it "should extract href" do
    @posts.each {|post| post.href.should_not be_empty }
  end

  it "should extract extended" do
    @posts.each {|post| post.extended.should_not be_empty }
  end

  it "should extract time" do
    @posts.each {|post| post.created_at.should be_an_instance_of(DateTime) }
  end
end