Skip to content

Commit

Permalink
Add render method performance test to check the number of allocated o…
Browse files Browse the repository at this point in the history
…bjects
  • Loading branch information
piotrmurach committed Jun 6, 2021
1 parent 2dd06ed commit 3007865
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/perf/frame_spec.rb
Expand Up @@ -17,4 +17,12 @@
YAML.dump(content)
}.at_most(12.5).times
end

it "displays box allocating no more than 423 objects" do
content = "Hello World"

expect {
TTY::Box.frame(content)
}.to perform_allocation(423).objects
end
end

0 comments on commit 3007865

Please sign in to comment.