spec/benchmark_spec.rb in mach5-tools-0.2.0 vs spec/benchmark_spec.rb in mach5-tools-0.2.1

- old
+ new

@@ -1,12 +1,12 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper') module Mach5 describe Benchmark do before(:each) do - @memory = double('Memory') - @tags = double('Tags') + @memory = Hash.new + @tags = Hash.new @benchmark = Benchmark.new(@memory, @tags) end it "should find benchmarks by commit id" do @memory.should_receive("[]").with("ab7c4351a13b29ea4c21e3662f9f567ff19a854d").and_return(["HMMDishonestCasino.Evaluate", "HMMDishonestCasino.Viterbi"]) @@ -28,8 +28,13 @@ end it "should tag commits" do @tags.should_receive("[]=").with("v1.0.1", "ab7c4351a13b29ea4c21e3662f9f567ff19a854d") @benchmark.tag("ab7c4351a13b29ea4c21e3662f9f567ff19a854d", "v1.0.1") + end + + it "should verify if there is the given tag" do + @benchmark.tag("ab7c4351a13b29ea4c21e3662f9f567ff19a854d", "v1.0.1") + @benchmark.has_tag?("ab7c4351a13b29ea4c21e3662f9f567ff19a854d").should be == "v1.0.1" end end end \ No newline at end of file