Sha256: 3d2deb0d0040a426bf39359b0c3c3c0da537f645d2386c0d252e9a94107015ec

Contents?: true

Size: 417 Bytes

Versions: 4

Compression:

Stored size: 417 Bytes

Contents

require "spec_helper"

describe NPR::Entity::Title do
  json_fixture do
    <<-JSON
      {
        "num": "2",
        "$text": "2312"
      }
    JSON
  end
  
  before :each do
    @title = NPR::Entity::Title.new(@fixture)
  end
  
  it "sets attributes" do
    @title.num.should eq 2
    @title.content.should eq "2312"
  end
  
  it "uses @content for to_s" do
    @title.to_s.should eq @title.content
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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