aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/string_inquirer_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/string_inquirer_test.rb')
-rw-r--r--activesupport/test/string_inquirer_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activesupport/test/string_inquirer_test.rb b/activesupport/test/string_inquirer_test.rb
new file mode 100644
index 0000000000..dda7850e6b
--- /dev/null
+++ b/activesupport/test/string_inquirer_test.rb
@@ -0,0 +1,15 @@
+require 'abstract_unit'
+
+class StringInquirerTest < Test::Unit::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_raises(NoMethodError) { ActiveSupport::StringInquirer.new("production").production }
+ end
+end