Mike RegistrationErr wrote in post #993883: > The script (test.rb): > > == START == > require 'rubygems' > require 'firewatir' > > include Test::Unit > include Test::Unit::Assertions > include Test::Unit::TestCase > > assert_same "hello", "hello" > == END == > > doesn't seem to work. It says: > test.rb:8: undefined method `assert_same' for main:Object > (NoMethodError) > > Surely the includes include this method? > > I am new to ruby. In ruby 'hello' and 'hello' are not *the same*. Quotes serve as a String constructor, and those are two different objects. For instance, a = 'hello' b = 'hello' if a.equal?(b) puts 'yes' else puts 'no' end --output:-- no You may wish to use assert_equal, which tests whether two strings contain the same characters: a = 'hello' b = 'hello' if a == b puts 'yes' else puts 'no' end --output:-- yes -- Posted via http://www.ruby-forum.com/.