Skip to content

Commit

Permalink
Improve speed for matcher spec.
Browse files Browse the repository at this point in the history
Using SpaceComplexity instead of TimeComplexity is good enough in
the case of matcher testing, because we just care about the matcher code.
  • Loading branch information
kouno committed Jul 25, 2012
1 parent fe70410 commit b5fdb0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/matchers/match_complexity_level_spec.rb
Expand Up @@ -3,7 +3,7 @@

describe 'match_complexity_level matcher' do
before :each do
@test_complexity = TimeComplexity.new({ :fn => lambda { |n| simulate_utime_processing(0.01 * n) } })
@test_complexity = SpaceComplexity.new({ :fn => lambda { |n| simulate_memory_space(1024 * n) } })
end

it "should not match O(1) for a constant augmentation" do
Expand Down

0 comments on commit b5fdb0a

Please sign in to comment.