2008-09-07 00:54:05 -05:00
|
|
|
require 'abstract_unit'
|
|
|
|
|
|
|
|
class StringInquirerTest < Test::Unit::TestCase
|
|
|
|
def test_match
|
|
|
|
assert ActiveSupport::StringInquirer.new("production").production?
|
|
|
|
end
|
2008-10-27 01:47:01 -05:00
|
|
|
|
2008-09-07 00:54:05 -05:00
|
|
|
def test_miss
|
|
|
|
assert !ActiveSupport::StringInquirer.new("production").development?
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_missing_question_mark
|
2009-03-16 09:55:30 -05:00
|
|
|
assert_raise(NoMethodError) { ActiveSupport::StringInquirer.new("production").production }
|
2008-09-07 00:54:05 -05:00
|
|
|
end
|
|
|
|
end
|