Skip to content

Commit

Permalink
Merge pull request #698 from Ryan1729/patch-1
Browse files Browse the repository at this point in the history
Check for VERSION on BookKeeping module in binary_search_tree
  • Loading branch information
kotp authored Jul 28, 2017
2 parents 820a137 + b3e2d34 commit 45430b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Bst
VERSION = 1

attr_reader :data, :left, :right
def initialize(data)
@data = data
Expand Down Expand Up @@ -43,3 +41,7 @@ def insert_right(value)
end
end
end

module BookKeeping
VERSION = 1
end
17 changes: 13 additions & 4 deletions exercises/binary-search-tree/binary_search_tree_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,25 @@ def test_each_returns_enumerator_if_no_block
assert_raises(StopIteration) { each_enumerator.next }
end

# Problems in exercism evolve over time,
# as we find better ways to ask questions.
# Problems in exercism evolve over time, as we find better ways to ask
# questions.
# The version number refers to the version of the problem you solved,
# not your solution.
#
# Define a constant named VERSION inside of Bst.
# Define a constant named VERSION inside of the top level BookKeeping
# module, which may be placed near the end of your file.
#
# In your file, it will look like this:
#
# module BookKeeping
# VERSION = 1 # Where the version number matches the one in the test.
# end
#
# If you are curious, read more about constants on RubyDoc:
# http://ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/constants.html

def test_bookkeeping
skip
assert_equal 1, Bst::VERSION
assert_equal 1, BookKeeping::VERSION
end
end

0 comments on commit 45430b2

Please sign in to comment.