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