1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/string_inquirer_test.rb

24 lines
484 B
Ruby
Raw Normal View History

require 'abstract_unit'
2012-01-05 20:12:46 -05:00
class StringInquirerTest < ActiveSupport::TestCase
def setup
@string_inquirer = ActiveSupport::StringInquirer.new('production')
end
def test_match
assert @string_inquirer.production?
end
def test_miss
refute @string_inquirer.development?
end
def test_missing_question_mark
assert_raise(NoMethodError) { @string_inquirer.production }
end
def test_respond_to
assert_respond_to @string_inquirer, :development?
end
end