Skip to content
Browse files

fix spec for #locate_pdftk

  • Loading branch information...
1 parent 5ad2267 commit 5d49a45bc76e01ac327743b8b30c0dd0f5cf8742 @elmatou committed Nov 16, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 spec/active_pdftk/call_spec.rb
View
14 spec/active_pdftk/call_spec.rb
@@ -3,13 +3,13 @@
describe ActivePdftk::Call do
context "#new" do
- before do
+ before :all do
options = {}
options[:path] = ENV['path'] unless ENV['path'].nil?
@pdftk = ActivePdftk::Call.new(options)
end
- it "should set the path (not nil)" do
+ it "should set the path (not nil)"do
@pdftk.default_statements[:path].should_not be_nil
end
@@ -24,7 +24,7 @@
if ENV['path']
it "should find the path of pdftk (unstable)" do
- @pdftk.default_statements[:path].should == ENV['path']
+ ActivePdftk::Call.locate_pdftk.should == ENV['path']
end
it "should allow a custom path" do # not very testing ~!?
@@ -48,7 +48,7 @@
context "#set_cmd" do
context "prepare command" do
- before do
+ before :all do
@pdftk = ActivePdftk::Call.new
end
@@ -95,7 +95,7 @@
end
context "build_range_option" do
- before do
+ before :all do
@pdftk = ActivePdftk::Call.new
end
@@ -142,7 +142,7 @@
end
context "build command" do
- before do
+ before :all do
@pdftk = ActivePdftk::Call.new(:input => 'test.pdf', :options => {:flatten => true})
end
@@ -161,7 +161,7 @@
end
context "#pdftk" do
- before do
+ before :each do
@pdftk = ActivePdftk::Call.new
@file = File.new path_to_pdf('spec.fields.pdf')
@tempfile = Tempfile.new('specs')

0 comments on commit 5d49a45

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