Sha256: e259c23e7918b0287ab7f739224663b3d070b1c6c07598fb75deb8c794f36b70

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 Bytes

Contents

require "spec_helper"

describe NPR::Entity::PullQuote do
  json_fixture do
    <<-JSON
      {
        "id": "162081891",
        "text": {
          "$text": "Unstructured time outdoors is becoming a thing of the past."
        },
        "person": {
          "$text": "Chelsea Benson"
        },
        "date": {}
      }
    JSON
  end
  
  before :each do
    @pull_quote = NPR::Entity::PullQuote.new(@fixture)
  end
  
  it "sets up attributes" do
    @pull_quote.id.should be_a Integer
    @pull_quote.text.should match /Unstructured/
    @pull_quote.person.should match /Chelsea/
    @pull_quote.date.should eq nil # no date information
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
npr-1.1.0 spec/unit/entity/pull_quote_spec.rb
npr-0.1.2 spec/unit/entity/pull_quote_spec.rb
npr-0.1.1 spec/unit/entity/pull_quote_spec.rb
npr-0.1.0 spec/unit/entity/pull_quote_spec.rb