Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix spec for #locate_pdftk

  • Loading branch information...
commit 5d49a45bc76e01ac327743b8b30c0dd0f5cf8742 1 parent 5ad2267
Marco authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 spec/active_pdftk/call_spec.rb
14 spec/active_pdftk/call_spec.rb
@@ -3,13 +3,13 @@
3 3
4 4 describe ActivePdftk::Call do
5 5 context "#new" do
6   - before do
  6 + before :all do
7 7 options = {}
8 8 options[:path] = ENV['path'] unless ENV['path'].nil?
9 9 @pdftk = ActivePdftk::Call.new(options)
10 10 end
11 11
12   - it "should set the path (not nil)" do
  12 + it "should set the path (not nil)"do
13 13 @pdftk.default_statements[:path].should_not be_nil
14 14 end
15 15
@@ -24,7 +24,7 @@
24 24
25 25 if ENV['path']
26 26 it "should find the path of pdftk (unstable)" do
27   - @pdftk.default_statements[:path].should == ENV['path']
  27 + ActivePdftk::Call.locate_pdftk.should == ENV['path']
28 28 end
29 29
30 30 it "should allow a custom path" do # not very testing ~!?
@@ -48,7 +48,7 @@
48 48
49 49 context "#set_cmd" do
50 50 context "prepare command" do
51   - before do
  51 + before :all do
52 52 @pdftk = ActivePdftk::Call.new
53 53 end
54 54
@@ -95,7 +95,7 @@
95 95 end
96 96
97 97 context "build_range_option" do
98   - before do
  98 + before :all do
99 99 @pdftk = ActivePdftk::Call.new
100 100 end
101 101
@@ -142,7 +142,7 @@
142 142 end
143 143
144 144 context "build command" do
145   - before do
  145 + before :all do
146 146 @pdftk = ActivePdftk::Call.new(:input => 'test.pdf', :options => {:flatten => true})
147 147 end
148 148
@@ -161,7 +161,7 @@
161 161 end
162 162
163 163 context "#pdftk" do
164   - before do
  164 + before :each do
165 165 @pdftk = ActivePdftk::Call.new
166 166 @file = File.new path_to_pdf('spec.fields.pdf')
167 167 @tempfile = Tempfile.new('specs')

0 comments on commit 5d49a45

Please sign in to comment.
Something went wrong with that request. Please try again.