Sha256: b722a49e808179486e105fd3ce0be6262b6e15edf24d3cd67131331ab4f8c0c3

Contents?: true

Size: 586 Bytes

Versions: 4

Compression:

Stored size: 586 Bytes

Contents

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| expect(post.description).to_not be_empty }
  end

  it "should extract href" do
    @posts.each {|post| expect(post.href).to_not be_empty }
  end

  it "should extract extended" do
    @posts.each {|post| expect(post.extended).to_not be_empty }
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
roxml-4.2.0 spec/examples/post_spec.rb
roxml-4.1.1 spec/examples/post_spec.rb
roxml-4.1.0 spec/examples/post_spec.rb
roxml-4.0.0 spec/examples/post_spec.rb