Skip to content

Commit

Permalink
Add spec to profile .grd importing
Browse files Browse the repository at this point in the history
  • Loading branch information
zeevallin committed Nov 22, 2015
1 parent 8abfb59 commit dcf94b3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions spec/gradient/grd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,17 @@ def color_to_rgb(color)
assert_maps(described_class.read(file))
end

it "returns a correct representation of the nine.grd", slow: true do
filename = Pathname(File.expand_path("../../fixtures/nine.grd", __FILE__))
expect { described_class.read(filename) }.to_not raise_exception
it "profile parsing nine.grd", profile: true, slow: true do
require "ruby-prof"

result = RubyProf.profile do |p|
Signal.trap("INT") { break }
filename = Pathname(File.expand_path("../../fixtures/nine.grd", __FILE__))
described_class.read(filename)
end

printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT)
end

end
Expand Down

0 comments on commit dcf94b3

Please sign in to comment.