Permalink
Browse files

Add the 'Fußball' example, currently exposing a bug.

  • Loading branch information...
1 parent 91de0f6 commit 0fe276e514f72b10eaf3e0d8b886e71ef6db68cf @arthurschreiber committed Apr 13, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 ruby/spec/version_space_spec.rb
@@ -149,6 +149,20 @@
@vs.s.should == [[:*, :*, :*, :*, :*, "Diesel", :*, :*, :*, :*, :*]]
end
+ it "should fail to build a VersionSpace for the example 'Fußball'" do
+ @vs = VersionSpace.new([[:*, :*]], [[:_, :_]])
+ @vs.positive_example(["rund", "schwarzrot"])
+ @vs.positive_example(["rund", "schwarzweiss"])
+
+ @vs.g.should == [[:*, :*]]
+ @vs.s.should == [["rund", :*]]
+
+ @vs.negative_example(["rund", "blau"])
+
+ @vs.g.should == []
+ @vs.s.should == []
+ end
+
describe "#more_general?" do
it "should return true if the first list is equal to the second" do
@vs.more_general?(["a"], ["a"]).should be_true

0 comments on commit 0fe276e

Please sign in to comment.