Skip to content

Check for VERSION on BookKeeping module in binary_search_tree #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -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
@@ -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