Sha256: 298c8375a651253866638b486c28818bc3fee2debaf1ce86d99954f88edca3f3

Contents?: true

Size: 562 Bytes

Versions: 5

Compression:

Stored size: 562 Bytes

Contents

require "spec_helper"

describe NPR::Entity::Crop do
  json_fixture do
    <<-JSON
      {
        "type": "enlargement",
        "src": "http://media.npr.org/assets/img/2012/12/14/121208bh0224-cb0bda2d8c5ec53151388f8a5faf3ddf12580434.jpg",
        "height": "2000",
        "width": "3000"
      }
    JSON
  end

  before :each do
    @crop = NPR::Entity::Crop.new(@fixture)
  end

  it "sets attributes" do
    @crop.type.should eq "enlargement"
    @crop.src.should match /media\.npr/
    @crop.height.should eq 2000
    @crop.width.should eq 3000
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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