aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/string_inquirer_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-06-04 15:06:32 -0500
committerJoshua Peek <josh@joshpeek.com>2008-06-04 15:06:32 -0500
commit5fe28789731fd521d5a250ac7be21da45dae147d (patch)
tree52d11356d414a6d7cdf830467c7f71cc00d43b1f /activesupport/test/string_inquirer_test.rb
parent6e85f14817cddb53875e572770bf3739f82e155f (diff)
downloadrails-5fe28789731fd521d5a250ac7be21da45dae147d.tar.gz
rails-5fe28789731fd521d5a250ac7be21da45dae147d.tar.bz2
rails-5fe28789731fd521d5a250ac7be21da45dae147d.zip
Renamed StringQuestioneer to StringInquirer.
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