Sha256: b2c42dcaf5064a21b0a202c05d720c742a4e9208fb40b0ac87defeca648475a8

Contents?: true

Size: 518 Bytes

Versions: 4

Compression:

Stored size: 518 Bytes

Contents

require "spec_helper"

describe NPR::Entity::Program do
  json_fixture do
    <<-JSON
      {
        "id": "3",
        "code": "ME",
        "$text": "Morning Edition"
      }
    JSON
  end
  
  before :each do
    @program = NPR::Entity::Program.new(@fixture)
  end
  
  it "sets up attributes" do
    @program.id.should be_a Integer
    @program.code.should eq "ME"
    @program.content.should eq "Morning Edition"
  end
  
  it "uses @content for to_s" do
    @program.to_s.should eq "Morning Edition"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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