Sha256: e0500761c7a840f6f97d5971ebf809d3ccaba41fc46027a8e0fb4d94959fde93
Contents?: true
Size: 1.36 KB
Versions: 13
Compression:
Stored size: 1.36 KB
Contents
require File.dirname(__FILE__) + '/../../test_helper' module Spec module Runner class SpecMatcherTest < Test::Unit::TestCase def test_should_match_context_and_spec matcher = SpecMatcher.new("a context with a spec", "a context") assert matcher.matches?("with a spec") end def test_should_not_match_wrong_context matcher = SpecMatcher.new("another context with a spec", "a context") assert !matcher.matches?("with a spec") end def test_should_not_match_wrong_spec matcher = SpecMatcher.new("a context with another spec", "a context") assert !matcher.matches?("with a spec") end def test_should_match_context_only matcher = SpecMatcher.new("a context", "a context") assert matcher.matches?("with a spec") end def test_should_not_match_wrong_context_only matcher = SpecMatcher.new("another context", "a context") assert !matcher.matches?("with a spec") end def test_should_match_spec_only matcher = SpecMatcher.new("with a spec", "a context") assert matcher.matches?("with a spec") end def test_should_match_wrong_spec_only matcher = SpecMatcher.new("with another spec", "a context") assert !matcher.matches?("with a spec") end end end end
Version data entries
13 entries across 13 versions & 1 rubygems