Sha256: 4fc4b0c5e2c6318b9eb35f933f2300a391553b18f89fabeaba7df9a55231c201

Contents?: true

Size: 738 Bytes

Versions: 8

Compression:

Stored size: 738 Bytes

Contents

require 'spec/spec_helper'
require '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| status.text.should_not be_empty }
    end

    it "should extract source" do
      @statuses.each {|status| status.source.should_not be_empty }
    end

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

      it "should extract name" do
        @users.each {|user| user.name.should == "John Nunemaker" }
      end

      it "should extract screen_name" do
        @users.each {|user| user.screen_name.should == "jnunemaker" }
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
yob-roxml-3.1.6 spec/examples/twitter_spec.rb
roxml-3.1.5 spec/examples/twitter_spec.rb
roxml-3.1.4 spec/examples/twitter_spec.rb
roxml-3.1.3 spec/examples/twitter_spec.rb
roxml-3.1.2 spec/examples/twitter_spec.rb
roxml-3.1.1 spec/examples/twitter_spec.rb
roxml-3.1.0 spec/examples/twitter_spec.rb
ROXML-3.0.0 spec/examples/twitter_spec.rb