aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/string_inquirer_test.rb
blob: bb15916e9e90a5ce02c2350011d51df59c5a5716 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'abstract_unit'

class StringInquirerTest < ActiveSupport::TestCase
  def test_match
    assert ActiveSupport::StringInquirer.new("production").production?
  end

  def test_miss
    assert !ActiveSupport::StringInquirer.new("production").development?
  end

  def test_missing_question_mark
    assert_raise(NoMethodError) { ActiveSupport::StringInquirer.new("production").production }
  end
end