Sha256: c97a61b2a36f5410637f9bbe4e3e198f6f7bba076d4a67423420058bc086830c

Contents?: true

Size: 616 Bytes

Versions: 4

Compression:

Stored size: 616 Bytes

Contents

require "spec_helper"

describe NPR::Entity::Paragraph do
  json_fixture do
    <<-JSON
      {
        "num": "1",
        "$text": "Louisiana music has such a hold on music lovers around the world that nearly every popular artist borrows from it. Or replicates it. Or, some might say, steals from it."
      }
    JSON
  end
  
  before :each do
    @paragraph = NPR::Entity::Paragraph.new(@fixture)
  end
  
  it "sets up attributes" do
    @paragraph.num.should eq 1
    @paragraph.content.should match /Louisiana/
  end
  
  it "uses @content for to_s" do
    @paragraph.to_s.should match /Louisiana/
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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