Sha256: cebf6f37810c70a6cf913f383a6d65ffe8e22afef6435dbbb8f54322823a621d

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

require File.expand_path("../spec_helper.rb", File.dirname(__FILE__))

describe TestController do
  
  describe "GET default_render" do
    it "returns correct PDF" do
      get "/default_render.pdf"
      response.should be_success
      
      asset_binary = File.open(TEST_ASSETS + "/default_render.pdf").read.bytes.to_a
      body_binary = response.body.bytes.to_a
      body_binary.should == asset_binary
    end
  end
  
  
  describe "GET dsl_render" do
    it "returns correct PDF" do
      get "/dsl_render.pdf"
      response.should be_success
      
      asset_binary = File.open(TEST_ASSETS + "/dsl_render.pdf").read.bytes.to_a
      body_binary = response.body.bytes.to_a
      body_binary.should == asset_binary
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prawnto_2-0.2.0.beta4 spec/integrations/test_controller_spec.rb
prawnto_2-0.2.0.beta3 spec/integrations/test_controller_spec.rb
prawnto_2-0.2.0.beta2 spec/integrations/test_controller_spec.rb