Skip to content

Commit

Permalink
Better inspect for job endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Evans committed Mar 9, 2012
1 parent f687755 commit f1af6a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dragonfly/job_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ def call(env={})

attr_reader :job

def inspect
"<#{self.class.name} steps=#{job.steps} >"
end

end
end
6 changes: 6 additions & 0 deletions spec/dragonfly/job_endpoint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,10 @@ def call(env)
end
end

describe "inspect" do
it "should be pretty yo" do
@job.to_app.inspect.should == %(<Dragonfly::JobEndpoint steps=[fetch("egg")] >)
end
end

end

0 comments on commit f1af6a3

Please sign in to comment.