Sha256: dfaf63a757ec9fbc0726ed36c08295ea0ff5eff53f85671acec72240ab356680

Contents?: true

Size: 768 Bytes

Versions: 4

Compression:

Stored size: 768 Bytes

Contents

require 'spec_helper'
require_relative './../../examples/twitter'

describe Statuses do
  describe Status do
    before do
      @statuses = Statuses.from_xml(xml_for('twitter')).statuses
    end

    it "should extract text" do
      @statuses.each {|status| expect(status.text).to_not be_empty }
    end

    it "should extract source" do
      @statuses.each {|status| expect(status.source).to_not be_empty }
    end

    describe User do
      before do
        @users = @statuses.map(&:user)
      end

      it "should extract name" do
        @users.each {|user| expect(user.name).to eq("John Nunemaker") }
      end

      it "should extract screen_name" do
        @users.each {|user| expect(user.screen_name).to eq("jnunemaker") }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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