Sha256: 52c06049bd557f975bee21bcfd78800fb6e1f47b5e698ed332fdee0f6f1abb54

Contents?: true

Size: 614 Bytes

Versions: 5

Compression:

Stored size: 614 Bytes

Contents

require "spec_helper"

describe NPR::Entity::Organization do
  json_fixture do
    <<-JSON
      {
        "orgId": "1",
        "orgAbbr": "NPR",
        "name": {
          "$text": "National Public Radio"
        },
        "website": {
          "$text": "http://www.npr.org/"
        }
      }
    JSON
  end

  before :each do
    @organization = NPR::Entity::Organization.new(@fixture)
  end

  it "sets up attributes" do
    @organization.name.should match /National/
    @organization.website.should match /npr\.org/
    @organization.orgId.should eq 1
    @organization.orgAbbr.should eq "NPR"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
npr-3.0.0 spec/unit/entity/organization_spec.rb
npr-2.0.2 spec/unit/entity/organization_spec.rb
npr-2.0.1 spec/unit/entity/organization_spec.rb
npr-2.0.0 spec/unit/entity/organization_spec.rb
npr-1.2.0 spec/unit/entity/organization_spec.rb