aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/string_questioneer_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-06-04 11:05:46 +1200
committerMichael Koziarski <michael@koziarski.com>2008-06-04 11:05:46 +1200
commite3c26e9926948587efcc8d31c729395093407df6 (patch)
tree358f418791a56620c32a48776739b4fdf39d3cb0 /activesupport/test/string_questioneer_test.rb
parentb9a9b91a3e3b892ab72ff5c618181747d6b4be04 (diff)
parent8afa725f4b98a6e0ceee4792e8ebaebb6189e5f6 (diff)
downloadrails-e3c26e9926948587efcc8d31c729395093407df6.tar.gz
rails-e3c26e9926948587efcc8d31c729395093407df6.tar.bz2
rails-e3c26e9926948587efcc8d31c729395093407df6.zip
Merge branch 'master' into patches
Diffstat (limited to 'activesupport/test/string_questioneer_test.rb')
-rw-r--r--activesupport/test/string_questioneer_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activesupport/test/string_questioneer_test.rb b/activesupport/test/string_questioneer_test.rb
new file mode 100644
index 0000000000..ff9d2c17f9
--- /dev/null
+++ b/activesupport/test/string_questioneer_test.rb
@@ -0,0 +1,15 @@
+require 'abstract_unit'
+
+class StringQuestioneerTest < Test::Unit::TestCase
+ def test_match
+ assert StringQuestioneer.new("production").production?
+ end
+
+ def test_miss
+ assert !StringQuestioneer.new("production").development?
+ end
+
+ def test_missing_question_mark
+ assert_raises(NoMethodError) { StringQuestioneer.new("production").production }
+ end
+end \ No newline at end of file